diff options
author | Graham Barr <gbarr@pobox.com> | 2003-06-17 08:33:15 +0000 |
---|---|---|
committer | Graham Barr <gbarr@pobox.com> | 2003-06-17 08:33:15 +0000 |
commit | 051c8d340f57f858c9e2a55803b888b0cd870cbe (patch) | |
tree | 209ad31f9f6a1958d61308a1c105e6b35f4fab58 | |
parent | 8f99b5424f7cad4f499250260ed1da84a2187141 (diff) | |
download | perl-libnet-051c8d340f57f858c9e2a55803b888b0cd870cbe.tar.gz |
Net::FTP
- Fix uninit warning when sending the ALLO command inside put
-rw-r--r-- | Net/FTP.pm | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -22,7 +22,7 @@ use Net::Config; use Fcntl qw(O_WRONLY O_RDONLY O_APPEND O_CREAT O_TRUNC); # use AutoLoader qw(AUTOLOAD); -$VERSION = "2.70"; # $Id: //depot/libnet/Net/FTP.pm#76 $ +$VERSION = "2.70"; # $Id: //depot/libnet/Net/FTP.pm#77 $ @ISA = qw(Exporter Net::Cmd IO::Socket::INET); # Someday I will "use constant", when I am not bothered to much about @@ -713,7 +713,8 @@ sub _store_cmd # _store_cmd call, figure out if the local file is a regular file(not # a pipe, or device) and if so get the file size from stat, and send # an ALLO command before sending the STOR, STOU, or APPE command. - $ftp->_ALLO(-s _) if -f $loc; # no ALLO if sending data from a pipe + my $size = -f $local && -s _; # no ALLO if sending data from a pipe + $ftp->_ALLO($size) if $size; } croak("Bad remote filename '$remote'\n") if $remote =~ /[\r\n]/s; @@ -1766,6 +1767,6 @@ under the same terms as Perl itself. =for html <hr> -I<$Id: //depot/libnet/Net/FTP.pm#76 $> +I<$Id: //depot/libnet/Net/FTP.pm#77 $> =cut |