[Dancer-users] Dancer::Config::load called twice?
Geistteufel
geistteufel at yahoo.fr
Mon Mar 28 08:50:26 CEST 2011
The first one load the default config file, and the second load the environment config file ?
Le 25 mars 2011 à 11:15, Alex C a écrit :
> I was looking through the source files just out of curiosity to see
> how things work and I have a couple of queries.
>
> Dancer::Config->load is called twice, first when Dancer::import is
> called, then again in Dancer::_start. Why is it necessary to call it
> the second time?
>
> And what is the purpose of these lines in Dancer::Config::load? I
> think that for a key to be in %$SETTINGS, it's hook must already have
> been called (via _trigger_hooks). So forcing the hooks to be called
> again like this seems unnecessary to me.
>
> 171 foreach my $key (grep { $setters->{$_} } keys %$SETTINGS) {
> 172 $setters->{$key}->($key, $SETTINGS->{$key});
> 173 }
>
> Thanks for info and I'm Sorry for poking around in the internals :)
>
> Alex
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
More information about the Dancer-users
mailing list