|
From: Mike S. <m...@pe...> - 2011-10-26 06:30:23
|
On Sun, 16 Oct 2011, Carlos Sepulveda Z. wrote:
> use Log::Log4perl qw(:easy);
> Log::Log4perl->easy_init($ERROR);
> my $a;
> ERROR($a);
>
> $ perl t.pl
> Use of uninitialized value in join or string at
> Log/Log4perl/Appender.pm line 167.
Sorry for the delay on this, I'm working through a backlog of email.
I'd say that the warning you're seeing is expected.
It's consistent with what you'd see with print(), if you try out
use warnings;
my $a;
print "$a\n";
you'll get the same message.
And you've enabled warnings, right? :)
--
-- Mike
Mike Schilli
m...@pe...
> 2011/10/16 20:49:01
>
> Line 167 of Appender say:
>
> 165 $p->{message} =
> 166 join($Log::Log4perl::JOIN_MSG_ARRAY_CHAR,
> 167 @{$p->{message}}
> 168 ) if ref $p->{message} eq "ARRAY";
>
>
> and I think this could be fixed modifying like this :
>
> 165 $p->{message} =
> 166 join($Log::Log4perl::JOIN_MSG_ARRAY_CHAR,
> 167 map { defined $_ ? $_ : 'undef' }
> @{$p->{message}}
> 168 ) if ref $p->{message} eq "ARRAY";
>
>
>
>
>
>
> |