Subject: | Warnings about Use of uninitialized value |
Date: | Tue, 23 Jan 2018 22:15:53 -0500 |
To: | <bug-Convert-BinHex [...] rt.cpan.org> |
From: | Daniel Macks <dmacks [...] netspace.org> |
During the self-test of Convert-BinHex-1.125 on OS X 10.13 (Apple's perl-5.18.2):
t/hex_to_bin_oo.t ......... Use of uninitialized value in integer lt (<) at /sw/build.build/convert-binhex-pm-1.125-1/Convert-BinHex-1.125/blib/lib/Convert/BinHex.pm line 839, <$_[...]> line 1.
In the read() function around line 839, it looks like a string is not yet defined (rather than defined to a null string) prior to the first chunk of the file being read in the while(){} loop. The length(undef) is undef rather than zero. Putting the following just before that while(){} loop solves it:
$self->{BIN_QUEUE} = '' unless defined $self->{BIN_QUEUE};
dan
--
Daniel Macks
dmacks@netspace.org