[Dancer-users] Sharing config files

Naveed Massjouni naveedm9 at gmail.com
Tue Nov 15 10:51:26 CET 2011


On Tue, Nov 15, 2011 at 4:01 AM, Stephen Fenwick-Paul
<stephen at activeg.org> wrote:
> Hi
> I have 2 Dancer apps, one a web site and another a RESTful api, both
> connecting to the same database
> At the mo they each have their own config.yml,  but as so much configuration
> detail between them is common it would be great to have a central
> configuration for the common stuff and then a config for the relatively few
> things unique to the app.
> Any ideas how achieve such a regime?
> thanks
> Stephen

I just thought of this, though it may not be the best way. You can
create an YourApp/CommonConfig.pm module which make calls to set().
Then you can import this module in both of your apps.
-Naveed


More information about the Dancer-users mailing list