Subject: | length() used on undefined values; causes warnings in perl <= 5.10.x |
I've only seen this one so far; but I suspect there are others:
Use of uninitialized value $final in length at lib/perl5/Net/Async/HTTP/Connection.pm line 440.
From:
my $final;
if( $decoder and not eval { $final = $decoder->(); 1 } ) {
$self->debug_printf( "ERROR decode failed" );
$f->fail( "Decode error $@", http => undef, $req );
$self->close;
return undef;
}
$on_body_chunk->( $final ) if length $final; # <-------
I suspect there might be more cases. It would be nice if these didn't warn on older Perls.
Thanks,
-- Matthew Horsfall (alh)