[dancer-users] Simple Dancer2::Plugin::Auth::Extensible issue

David H untg99 at gmail.com
Sun Aug 9 16:48:13 BST 2015

Hi All,

I've been struggling with a simple example and trying to get it to work but
without any luck.
I'm using Dancer2::Plugin::Auth::Extensible to get users/roles and using a
simple SQLite database
My Config.yml is this (in relation to the database and Auth::Extensible):





                    provider: 'Database'


            driver: 'SQLite'

            database: 'users.sqlite'

And my DancerWebsite.pm contains these relevant modules:

use Dancer2::Session::Memcached;

#use Dancer2::Plugin::Auth::Extensible::Provider::Database; # < not sure if
I need this, doesn't work either way.

use Dancer2::Plugin::Auth::Extensible;

use Dancer2::Plugin::Database;

I'm getting this error when trying to go to the /login route, which is:

Can't locate object method "database" via package
"Dancer2::Core::DSL__WITH__Dancer2::Plugin::Auth::Extensible" at
line 186, <$fh> line 12.

 Line 186:

my $database = $self->realm_dsl->database($settings->{db_connection_name})

        or die "No database connection";

get '/login' => sub {
   template login => {};

So I'm wondering if I've got something basic wrong here about the modules
I'm loading or something, if anyone has had experience using this module?

Thanks a lot,

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20150810/b36f4694/attachment.html>

More information about the dancer-users mailing list