diff options
author | Steve Hay <SteveHay@planit.com> | 2005-07-25 11:53:44 +0000 |
---|---|---|
committer | Steve Hay <SteveHay@planit.com> | 2005-07-25 11:53:44 +0000 |
commit | df76848ee32b55bf5d182b087f9159faa8bd33f8 (patch) | |
tree | 5018aa169dc1bc5713edd772dbcc65a3dc92625f /lib/Net | |
parent | 8bdc704b4ed4fab9a538bca405d43887fb36a32f (diff) | |
download | perl-df76848ee32b55bf5d182b087f9159faa8bd33f8.tar.gz |
Silence uninitialized value warnings in Net::Cmd
(Suppresses 20 such warnings emitted by lib/Net/t/datasend.t)
p4raw-id: //depot/perl@25224
Diffstat (limited to 'lib/Net')
-rw-r--r-- | lib/Net/Cmd.pm | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/Net/Cmd.pm b/lib/Net/Cmd.pm index a84b4da80e..b39375f1f5 100644 --- a/lib/Net/Cmd.pm +++ b/lib/Net/Cmd.pm @@ -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)) |