[Dancer-users] reusing config.yml with environments

sawyer x xsawyerx at gmail.com
Mon Feb 14 20:28:29 CET 2011


Sorry for the late reply!

2011/2/14 Иван Бессарабов <ivan at bessarabov.ru>

> For what I know the dancer has no user friendly way of using config
> values outside dancer webapp.
>

Sure it does!


> I hope that somebody will write code that will solve this small issue
> (as we know there is a great myth about dancer, that one should only
> suggest plugin in the mail list and sooner or later the code will be
> on cpan =).
>

I would if it didn't already exist. :)

All you need to do is:
use Dancer::Config 'setting';

my $template = setting('template');
my $layout = setting('layout');
my $extra = setting('MySettings');

Hope this helps!
Sawyer.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20110214/a55a3380/attachment.htm>


More information about the Dancer-users mailing list