[Dancer-users] Dancer::Config::load called twice?
Alex C
calyx2011 at gmail.com
Fri Mar 25 11:15:22 CET 2011
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
More information about the Dancer-users
mailing list