diff options
author | Graham Barr <gbarr@pobox.com> | 2005-08-03 00:36:14 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2009-02-24 10:40:47 -0600 |
commit | ca4b6487b2aa70597640d87a18a4ab0df1a3b819 (patch) | |
tree | 622e6ac3605375d5cf1dfb6ec5644f98ca92d219 | |
parent | 3068255c9557cb6891bc82d3117ee7a9c438cb2c (diff) | |
download | perl-libnet-ca4b6487b2aa70597640d87a18a4ab0df1a3b819.tar.gz |
Silence uninitialized value warnings in Net::Cmd during testing on Win32 (from Steve Hay)
-rw-r--r-- | Net/Cmd.pm | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -21,7 +21,7 @@ BEGIN { } } -$VERSION = "2.26"; +$VERSION = "2.26_01"; @ISA = qw(Exporter); @EXPORT = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING); @@ -431,7 +431,8 @@ sub datasend while($len) { my $wout; - if (select(undef,$wout=$win, undef, $timeout) > 0 or -f $cmd) # -f for testing on win32 + my $s = select(undef,$wout=$win, undef, $timeout); + if ((defined $s and $s > 0) or -f $cmd) # -f for testing on win32 { my $w = syswrite($cmd, $line, $len, $offset); unless (defined($w)) |