On 5/12/2015 8:50 AM, Andrew Beverley wrote:
On Fri, 2015-12-04 at 16:37 -0500, John Stoffel wrote:
I'm trying to play with Authentication in Dancer2, and I can't get the
dang example from Gabor at his blog
(http://perlmaven.com/password-protecting-web-pages-in-dancer2) to
run, it keeps giving me the following error:
No Auth::Extensible realms configured with which to authenticate
user
Your example works for me. Are you sure the app is reading your config
at all?
The config and code in John's example looks ok.
And I'm invoking it like this:
~/tmp/Dancer2> ../../perl5/perlbrew/perls/perl-5.14.2/bin/plackup -R .
app.pl
Dancer2 uses a heuristic to locate app config files if
$ENV{DANCER_CONFDIR} is not set.
This iterates up the directory structure looking for ./bin and ./lib
sub-directories or a
.dancer file.
Based on having those routes defined in app.pl, I'm assuming that you
had no ./bin
and ./lib subdirs in ~/tmp/Dancer2, so the heuristic doesn't find the
config file there.
Creating a .dancer file (content is not important) in that directory
will resolve that.
Regards,
Russell.
_______________________________________________
dancer-users mailing list
[email protected]
http://lists.preshweb.co.uk/mailman/listinfo/dancer-users