Can I write own config in config.yml?
I try to write my own elasticsearch config in config.yml: ElasticSearch: servers: "10.10.10.33:9200" transport: "httplite" max_requests: 10000 trace_calls: 0 no_refresh: 0 But after I got the right `config->{ElasticSearch}` in my lib/DancerApp/A.pm, I got `config->{ElasticSearch}` in my lib/DancerApp/B.pm returns only one line as 'trace_calls:0'. I try to got config->{appdir} at multi sub and got right result everywhere. Why??
On Mon, 10 Dec 2012 16:56:46 +0800 chenlin rao <rao.chenlin@gmail.com> wrote:
I try to write my own elasticsearch config in config.yml:
ElasticSearch: servers: "10.10.10.33:9200" transport: "httplite" max_requests: 10000 trace_calls: 0 no_refresh: 0
That looks fine.
But after I got the right `config->{ElasticSearch}` in my lib/DancerApp/A.pm, I got `config->{ElasticSearch}` in my lib/DancerApp/B.pm returns only one line as 'trace_calls:0'.
I try to got config->{appdir} at multi sub and got right result everywhere.
Why??
Can you show your code? config->{ElasticSearch} should give you the same in each case, unless it's being modified by something. -- David Precious ("bigpresh") <davidp@preshweb.co.uk> http://www.preshweb.co.uk/ www.preshweb.co.uk/twitter www.preshweb.co.uk/linkedin www.preshweb.co.uk/facebook www.preshweb.co.uk/cpan www.preshweb.co.uk/github
I think you forgot something like `use Dancer;` in the second module. 10.12.2012 14:56, chenlin rao пишет:
I try to write my own elasticsearch config in config.yml:
ElasticSearch: servers: "10.10.10.33:9200 <http://10.10.10.33:9200>" transport: "httplite" max_requests: 10000 trace_calls: 0 no_refresh: 0
But after I got the right `config->{ElasticSearch}` in my lib/DancerApp/A.pm, I got `config->{ElasticSearch}` in my lib/DancerApp/B.pm returns only one line as 'trace_calls:0'.
I try to got config->{appdir} at multi sub and got right result everywhere.
Why??
_______________________________________________ dancer-users mailing list dancer-users@dancer.pm http://lists.preshweb.co.uk/mailman/listinfo/dancer-users
-- Best Regards, Nick Knutov http://knutov.com ICQ: 272873706 Voice: +7-904-84-23-130
participants (3)
-
chenlin rao -
David Precious -
Nick Knutov