Subject: | Log::Dispatch::File constructor doesn't cope with new API |
Using Log::Dispatch::File with the new API leads to this error:
"Reference found where even-sized list expected at
/usr/lib/perl5/vendor_perl/5.10.0/Log/Dispatch/File.pm line 26."
My code looks like this:
my $log = Log::Dispatch->new( outputs => [ ['File',
{ min_level => 'debug',
filename => '/tmp/file.log',
mode => 'append',
stderr => 0,
autoflush => 1,
newline => 1 } ] ] );
The attached patch fixes that.
Subject: | File.pm.diff |
--- lib/Log/Dispatch/File.pm 2009-09-16 00:57:51.000000000 +0200
+++ File.pm 2009-09-22 17:57:51.000000000 +0200
@@ -23,7 +23,7 @@
my $proto = shift;
my $class = ref $proto || $proto;
- my %p = @_;
+ my %p = validate(@_, {});
my $self = bless {}, $class;