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