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...@perlmeister.com

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";




 

------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn 
about Cisco certifications, training, and career opportunities. 
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
log4perl-devel mailing list
log4perl-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/log4perl-devel

Reply via email to