config.yml:<div><span style="font-family:arial,sans-serif;font-size:14px">&gt; ElasticSearch:</span><br style="font-family:arial,sans-serif;font-size:14px"><span style="font-family:arial,sans-serif;font-size:14px">&gt;     servers: &quot;</span><a href="http://10.10.10.33:9200/" target="_blank" style="font-family:arial,sans-serif;font-size:14px">10.10.10.33:9200</a><span style="font-family:arial,sans-serif;font-size:14px">&quot;</span><br style="font-family:arial,sans-serif;font-size:14px">
<span style="font-family:arial,sans-serif;font-size:14px">&gt;     transport: &quot;httplite&quot;</span><br style="font-family:arial,sans-serif;font-size:14px"><span style="font-family:arial,sans-serif;font-size:14px">&gt;     max_requests: 10000</span><br style="font-family:arial,sans-serif;font-size:14px">
<span style="font-family:arial,sans-serif;font-size:14px">&gt;     trace_calls: 0</span><br style="font-family:arial,sans-serif;font-size:14px"><span style="font-family:arial,sans-serif;font-size:14px">&gt;     no_refresh: 0</span></div>
<div><font face="arial, sans-serif"><span style="font-size:14px">lib/App.pm:</span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">&gt;use lib &quot;$Bin/../lib&quot;;</span></font></div><div>
<font face="arial, sans-serif"><span style="font-size:14px">&gt;use App::A;</span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">&gt;use App::B;</span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">lib/App/A.pm:</span></font></div>
<div><font face="arial, sans-serif"><span style="font-size:14px">&gt;use Dancer &#39;:syntax&#39;;</span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">&gt;use ElasticSearch;</span></font></div>
<div><font face="arial, sans-serif"><span style="font-size:14px">&gt;my $elsearch = ElasticSearch-&gt;new( config-&gt;{ElasticSearch} );</span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">&gt;prefix &#39;/a&#39;;</span></font></div>
<div><font face="arial, sans-serif"><span style="font-size:14px">&gt;get &#39;/config&#39; =&gt; sub { return Dumper $elsearch };</span></font></div><div><div><font face="arial, sans-serif"><span style="font-size:14px">lib/App/B.pm:</span></font></div>
<div><font face="arial, sans-serif"><span style="font-size:14px">&gt;use Dancer &#39;:syntax&#39;;</span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">&gt;use ElasticSearch;</span></font></div>
<div><font face="arial, sans-serif"><span style="font-size:14px">&gt;my $elsearch = ElasticSearch-&gt;new( config-&gt;{ElasticSearch} );</span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px">&gt;prefix &#39;/b&#39;;</span></font></div>
<div><font face="arial, sans-serif"><span style="font-size:14px">&gt;get &#39;/config&#39; =&gt; sub { return Dumper $elsearch };</span></font></div><div><font face="arial, sans-serif"><span style="font-size:14px"><br></span></font></div>
<div><font face="arial, sans-serif"><span style="font-size:14px">Then `get <a href="http://localhost:3000/a/config`">http://localhost:3000/a/config`</a> show that servers: &quot;<a href="http://10.10.10.33:9200">10.10.10.33:9200</a>&quot; but `get <a href="http://localhost:3000/b/config`">http://localhost:3000/b/config`</a> show that servers: &quot;<a href="http://127.0.0.1:9200">127.0.0.1:9200</a>&quot; which is the default setting of ElasticSearch module.</span></font></div>
<div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2012/12/10  <span dir="ltr">&lt;<a href="mailto:dancer-users-request@dancer.pm" target="_blank">dancer-users-request@dancer.pm</a>&gt;</span><br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Send dancer-users mailing list submissions to<br>
        <a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
or, via email, send a message with subject or body &#39;help&#39; to<br>
        <a href="mailto:dancer-users-request@dancer.pm">dancer-users-request@dancer.pm</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:dancer-users-owner@dancer.pm">dancer-users-owner@dancer.pm</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than &quot;Re: Contents of dancer-users digest...&quot;<br>
<br>
<br>
Today&#39;s Topics:<br>
<br>
   1. Can I write own config in config.yml? (chenlin rao)<br>
   2. Re: Can I write own config in config.yml? (David Precious)<br>
   3. Re: Can I write own config in config.yml? (David Precious)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Mon, 10 Dec 2012 16:56:46 +0800<br>
From: chenlin rao &lt;<a href="mailto:rao.chenlin@gmail.com">rao.chenlin@gmail.com</a>&gt;<br>
Subject: [dancer-users] Can I write own config in config.yml?<br>
To: <a href="mailto:dancer-users@perldancer.org">dancer-users@perldancer.org</a><br>
Message-ID:<br>
        &lt;CABwsoohczVCJwVxZcFUqPaS2KdxsK8-rE-V0=<a href="mailto:TeJEmDEPr4r5w@mail.gmail.com">TeJEmDEPr4r5w@mail.gmail.com</a>&gt;<br>
Content-Type: text/plain; charset=&quot;iso-8859-1&quot;<br>
<br>
I try to write my own elasticsearch config in config.yml:<br>
<br>
ElasticSearch:<br>
    servers: &quot;<a href="http://10.10.10.33:9200" target="_blank">10.10.10.33:9200</a>&quot;<br>
    transport: &quot;httplite&quot;<br>
    max_requests: 10000<br>
    trace_calls: 0<br>
    no_refresh: 0<br>
<br>
But after I got the right `config-&gt;{ElasticSearch}` in my<br>
lib/DancerApp/A.pm, I got `config-&gt;{ElasticSearch}` in my<br>
lib/DancerApp/B.pm returns only one line as &#39;trace_calls:0&#39;.<br>
<br>
I try to got config-&gt;{appdir} at multi sub and got right result everywhere.<br>
<br>
Why??<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: &lt;<a href="http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20121210/85f94448/attachment.html" target="_blank">http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20121210/85f94448/attachment.html</a>&gt;<br>

<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Mon, 10 Dec 2012 10:46:51 +0000<br>
From: David Precious &lt;<a href="mailto:davidp@preshweb.co.uk">davidp@preshweb.co.uk</a>&gt;<br>
Subject: Re: [dancer-users] Can I write own config in config.yml?<br>
To: Perl Dancer users mailing list &lt;<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a>&gt;,<br>
        <a href="mailto:dancer-users@perldancer.org">dancer-users@perldancer.org</a><br>
Message-ID: &lt;20121210104651.65d2c92f@columbia&gt;<br>
Content-Type: text/plain; charset=US-ASCII<br>
<br>
On Mon, 10 Dec 2012 16:56:46 +0800<br>
chenlin rao &lt;<a href="mailto:rao.chenlin@gmail.com">rao.chenlin@gmail.com</a>&gt; wrote:<br>
<br>
&gt; I try to write my own elasticsearch config in config.yml:<br>
&gt;<br>
&gt; ElasticSearch:<br>
&gt;     servers: &quot;<a href="http://10.10.10.33:9200" target="_blank">10.10.10.33:9200</a>&quot;<br>
&gt;     transport: &quot;httplite&quot;<br>
&gt;     max_requests: 10000<br>
&gt;     trace_calls: 0<br>
&gt;     no_refresh: 0<br>
<br>
That looks fine.<br>
<br>
&gt; But after I got the right `config-&gt;{ElasticSearch}` in my<br>
&gt; lib/DancerApp/A.pm, I got `config-&gt;{ElasticSearch}` in my<br>
&gt; lib/DancerApp/B.pm returns only one line as &#39;trace_calls:0&#39;.<br>
&gt;<br>
&gt; I try to got config-&gt;{appdir} at multi sub and got right result<br>
&gt; everywhere.<br>
&gt;<br>
&gt; Why??<br>
<br>
Can you show your code?  config-&gt;{ElasticSearch} should give you the<br>
same in each case, unless it&#39;s being modified by something.<br>
<br>
<br>
--<br>
David Precious (&quot;bigpresh&quot;) &lt;<a href="mailto:davidp@preshweb.co.uk">davidp@preshweb.co.uk</a>&gt;<br>
<a href="http://www.preshweb.co.uk/" target="_blank">http://www.preshweb.co.uk/</a>     <a href="http://www.preshweb.co.uk/twitter" target="_blank">www.preshweb.co.uk/twitter</a><br>
<a href="http://www.preshweb.co.uk/linkedin" target="_blank">www.preshweb.co.uk/linkedin</a>    <a href="http://www.preshweb.co.uk/facebook" target="_blank">www.preshweb.co.uk/facebook</a><br>
<a href="http://www.preshweb.co.uk/cpan" target="_blank">www.preshweb.co.uk/cpan</a>        <a href="http://www.preshweb.co.uk/github" target="_blank">www.preshweb.co.uk/github</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
Message: 3<br>
Date: Mon, 10 Dec 2012 10:46:51 +0000<br>
From: David Precious &lt;<a href="mailto:davidp@preshweb.co.uk">davidp@preshweb.co.uk</a>&gt;<br>
Subject: Re: [dancer-users] Can I write own config in config.yml?<br>
To: Perl Dancer users mailing list &lt;<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a>&gt;,<br>
        <a href="mailto:dancer-users@perldancer.org">dancer-users@perldancer.org</a><br>
Message-ID: &lt;20121210104651.65d2c92f@columbia&gt;<br>
Content-Type: text/plain; charset=US-ASCII<br>
<br>
On Mon, 10 Dec 2012 16:56:46 +0800<br>
chenlin rao &lt;<a href="mailto:rao.chenlin@gmail.com">rao.chenlin@gmail.com</a>&gt; wrote:<br>
<br>
&gt; I try to write my own elasticsearch config in config.yml:<br>
&gt;<br>
&gt; ElasticSearch:<br>
&gt;     servers: &quot;<a href="http://10.10.10.33:9200" target="_blank">10.10.10.33:9200</a>&quot;<br>
&gt;     transport: &quot;httplite&quot;<br>
&gt;     max_requests: 10000<br>
&gt;     trace_calls: 0<br>
&gt;     no_refresh: 0<br>
<br>
That looks fine.<br>
<br>
&gt; But after I got the right `config-&gt;{ElasticSearch}` in my<br>
&gt; lib/DancerApp/A.pm, I got `config-&gt;{ElasticSearch}` in my<br>
&gt; lib/DancerApp/B.pm returns only one line as &#39;trace_calls:0&#39;.<br>
&gt;<br>
&gt; I try to got config-&gt;{appdir} at multi sub and got right result<br>
&gt; everywhere.<br>
&gt;<br>
&gt; Why??<br>
<br>
Can you show your code?  config-&gt;{ElasticSearch} should give you the<br>
same in each case, unless it&#39;s being modified by something.<br>
<br>
<br>
--<br>
David Precious (&quot;bigpresh&quot;) &lt;<a href="mailto:davidp@preshweb.co.uk">davidp@preshweb.co.uk</a>&gt;<br>
<a href="http://www.preshweb.co.uk/" target="_blank">http://www.preshweb.co.uk/</a>     <a href="http://www.preshweb.co.uk/twitter" target="_blank">www.preshweb.co.uk/twitter</a><br>
<a href="http://www.preshweb.co.uk/linkedin" target="_blank">www.preshweb.co.uk/linkedin</a>    <a href="http://www.preshweb.co.uk/facebook" target="_blank">www.preshweb.co.uk/facebook</a><br>
<a href="http://www.preshweb.co.uk/cpan" target="_blank">www.preshweb.co.uk/cpan</a>        <a href="http://www.preshweb.co.uk/github" target="_blank">www.preshweb.co.uk/github</a><br>
<br>
<br>
<br>
<br>
------------------------------<br>
<br>
_______________________________________________<br>
dancer-users mailing list<br>
<a href="mailto:dancer-users@dancer.pm">dancer-users@dancer.pm</a><br>
<a href="http://lists.preshweb.co.uk/mailman/listinfo/dancer-users" target="_blank">http://lists.preshweb.co.uk/mailman/listinfo/dancer-users</a><br>
<br>
<br>
End of dancer-users Digest, Vol 34, Issue 3<br>
*******************************************<br>
</blockquote></div><br></div>