Subject: | Cosmetic "bug" in Dancer::Plugin::Database::Handler |
Date: | Tue, 22 Mar 2011 22:18:09 +0100 |
To: | David Precious via RT <bug-Dancer-Plugin-Database [...] rt.cpan.org> |
From: | Michael Stiller <ms [...] 2scale.net> |
Hi,
consider e.g. using database->quick_update with blob data.
You will end up with a (huge) debug log entry consisting of unreadable
characters. (Which will also drive your terminal mad)
Maybe change the debug log line to something like this:
--- Handle.pm.orig 2011-03-22 21:53:15.000000000 +0100
+++ Handle.pm 2011-03-22 22:06:45.000000000 +0100
@@ -158,7 +158,8 @@
}
Dancer::Logger::debug(
- "Executing $type query $sql with params " . join ',', @bind_params
+ "Executing $type query $sql with params " . join ',',
+ map { $_ =~ /^[[:ascii:]]+$/ ? $_ : "'NO-ASCII'" } @bind_params
);
Cheers,
Michael
--
2scale GmbH, Karlstr. 88, 40210 Düsseldorf
Amtsgericht: Düsseldorf HRB 50718
Geschäftsführer: Georg von Zezschwitz, Dirk Vleugels
USt-IdNr.: DE 210936505