Subject: | test suite under perl 5.12 outputs warnings: Use of uninitialized value in lc at blib/lib/Weather/Com/Base.pm line 312. |
running regress tests, i see warnings:
PERL_DL_NONLAZY=1 /usr/bin/perl "-MExtUtils::Command::MM" "-e"
"test_harness(0, 'blib/lib', 'blib/arch')" t/*.t
t/AirPressure.t .. ok
t/Base.t ......... 1/6 Use of uninitialized value in lc at
/home/gsoares/perlstuffs/Weather-Com-0.5.5/blib/lib/Weather/Com/Base.pm
line 312.
Use of uninitialized value in lc at
/home/gsoares/perlstuffs/Weather-Com-0.5.5/blib/lib/Weather/Com/Base.pm
line 312.
t/Base.t ......... ok
t/Cached.t ....... 1/6 Use of uninitialized value in lc at
/home/gsoares/perlstuffs/Weather-Com-0.5.5/blib/lib/Weather/Com/Base.pm
line 312.
Use of uninitialized value in lc at
/home/gsoares/perlstuffs/Weather-Com-0.5.5/blib/lib/Weather/Com/Base.pm
line 312.
we can fix this fairly painlessly by just specifying a default value to
an empty string:
lc( $self->{PROXY_USER} || '' )
attached a diff that fix it. make tests suite happy.
Subject: | Weather-Com-0.5.5_warning_testsuit.diff |
--- lib/Weather/Com/Base.pm.orig Mon Apr 4 15:31:04 2011
+++ lib/Weather/Com/Base.pm Mon Apr 4 15:31:21 2011
@@ -311,7 +311,7 @@
if ( lc( $self->{PROXY} ) ne "none" );
$request->proxy_authorization_basic( $self->{PROXY_USER},
$self->{PROXY_PASS} )
- if ( lc( $self->{PROXY_USER} ) ne "none" );
+ if ( lc( $self->{PROXY_USER} || '' ) ne "none" );
$ua->timeout( $self->{TIMEOUT} );
# print some debugging info on the user agent object