[dancer-users] "use Dancer2" interferes with package exports
Warren Young
warren at etr-usa.com
Sun Jan 26 02:24:39 GMT 2014
On 1/25/2014 01:40, Stefan Hornburg (Racke) wrote:
>
> Dancer(2)::Config isn't the place to look for Dancer's keywords
> (DSL).
I think you're assuming that I went into this knowing that I was looking
for a keyword, and that the docs are consistent.
If you go to the Dancer2 cookbook, about halfway down the page, you find
these two lines in the same example:
Dancer2::Config::setting('appdir',$appdir);
print "environment:".config->{environment}."\n"; #development
The first should be
config->{appdir} = $appdir
...I guess?
> config->{appdir}
Thanks. I've printed this in my debug log, along with config->{public},
and neither change when I comment out the "use Dancer2" in the other module.
So, I'm left without any explanation at all.
I then tried "debug Dumper(config())", but got tens of thousands of
characters. So I then dumped the config() hashref to a file, and diffed
the files in the two cases, and got hundreds of lines of changes. All
that from changing one line in a file that shouldn't even be *related*
to the one where the problem occurs.
Can anyone explain how the Foo module exports get changed in my trivial
example?
More information about the dancer-users
mailing list