[Dancer-users] D::P::Db

Perlover perlover at perlover.com
Wed Nov 30 00:13:26 CET 2011


database('pg')-> prepare...
29.11.2011 23:38 пользователь "Puneet Kishor" <punkish at eidesis.org> написал:

> I must be doing something wrong, but don't know what. I have the following
> database definitions in my config file
>
>    plugins:
>        Database:
>            connections:
>                pg:
>                    driver: 'Pg'
>                    ..
>                    ..
>                mysql:
>                    driver: 'mysql'
>                    ..
>                    ..
>
> Then, in my code
>
>    my $sth1 = database->('pg')->prepare(qq{
>        SELECT blah
>    });
>    $sth1->execute();
>
>    and
>
>    my $sth2 = database->('mysql')->prepare(qq{
>        SELECT blah
>    });
>    $sth2->execute();
>
> But, I get the following error in my log file
>
>    Can't connect to data source 'dbi:' because I can't work out what
> driver to use (it doesn't seem to contain a 'dbi:driver:' prefix and the
> DBI_DRIVER env var is not set) at
> /opt/local/lib/perl5/site_perl/5.14.1/Dancer/Plugin/Database.pm line 161 in
> /opt/local/lib/perl5/site_perl/5.14.1/Dancer/Handler.pm l. 90
>
> I am using Dancer::Plugin::Database 1.51
>
> --
> Puneet Kishor
> _______________________________________________
> Dancer-users mailing list
> Dancer-users at perldancer.org
> http://www.backup-manager.org/cgi-bin/listinfo/dancer-users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.backup-manager.org/pipermail/dancer-users/attachments/20111130/e1d3efe6/attachment.htm>


More information about the Dancer-users mailing list