Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Dancer-Plugin-Database CPAN distribution.

Report information
The Basics
Id: 79719
Status: open
Priority: 0/
Queue: Dancer-Plugin-Database

People
Owner: Nobody in particular
Requestors: hugh [...] hcgallagher.co.uk
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Logging crashing app
Hi there! I'm running; Dancer 1.31 Dancer::Plugin::Database 2.00 on Perl 5.12.4 OSX 10.8.1. with the following config plugins: Database: driver: "SQLite" database: "database.db" My app is crashing with the following error; Can't use string ("") as a subroutine ref while "strict refs" in use at /Library/Perl/5.12/Dancer/Plugin/Database.pm line 16, <DATA> line 16. The problem may well be fixed with the following patch --- Database.pm 2012-09-18 10:51:46.000000000 +0100 +++ Database.pm.patched 2012-09-18 10:52:28.000000000 +0100 @@ -188,7 +188,7 @@ my $param = $param_for_driver{$driver}; if ($param && !$settings->{dbi_params}{$param}) { - $logger->(debug, + $logger->(debug => "Adding $param to DBI connection params to enable UTF-8 support"); $settings->{dbi_params}{$param} = 1; } Kind Regards, Hugh
On 2012-09-18 11:00:55, PughPugh wrote: Show quoted text
> Hi there! > > I'm running; > Dancer 1.31 > Dancer::Plugin::Database 2.00 > > on > Perl 5.12.4 > OSX 10.8.1. > > with the following config > > plugins: > Database: > driver: "SQLite" > database: "database.db" > > My app is crashing with the following error; > > Can't use string ("") as a subroutine ref while "strict refs" in use > at > /Library/Perl/5.12/Dancer/Plugin/Database.pm line 16, <DATA> line 16. > > The problem may well be fixed with the following patch > > --- Database.pm 2012-09-18 10:51:46.000000000 +0100 > +++ Database.pm.patched 2012-09-18 10:52:28.000000000 +0100 > @@ -188,7 +188,7 @@ > my $param = $param_for_driver{$driver}; > > if ($param && !$settings->{dbi_params}{$param}) { > - $logger->(debug, > + $logger->(debug => > "Adding $param to DBI connection params to > enable UTF-8 support"); > $settings->{dbi_params}{$param} = 1; > }
Gah! I'm not sure how that bug got through testing by two different people, and CPAN tester reports. Sorry - that's a pathetic little error. Fixing now, will get 2.01 released ASAP.
I've just released 2.01 with the fix for this embarrassing bug. Thanks for reporting it and providing the fix - hope it didn't cost too much of your time :|
From: hugh [...] hcgallagher.co.uk
On Tue Sep 18 08:27:43 2012, BIGPRESH wrote: Show quoted text
> I've just released 2.01 with the fix for this embarrassing bug. > > Thanks for reporting it and providing the fix - hope it didn't cost too > much of your time :|
Ha, no worries. It did stump me for a while, but obviously there is great pleasure in figuring these thing out. Cheers, Hugh