about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>2004-03-20 10:31:19 +0000
committerGraham Barr <gbarr@pobox.com>2009-02-24 08:51:37 -0600
commiteab6aa0583260aea8826bb8fe1850f5d910de8d4 (patch)
treedd24d96f1f7791587262d67bfc5c52753988efa0
parentf9a6d6d3ebd172d482393bdd268bcbd2db174b7a (diff)
downloadperl-libnet-eab6aa0583260aea8826bb8fe1850f5d910de8d4.tar.gz
Suppress warning from -f if handle is not real (ie tied)
-rw-r--r--Net/FTP.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/Net/FTP.pm b/Net/FTP.pm
index f871de4..0e31cf3 100644
--- a/Net/FTP.pm
+++ b/Net/FTP.pm
@@ -725,7 +725,7 @@ 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.
-   my $size = -f $local && -s _; # no ALLO if sending data from a pipe
+   my $size = do { local $^W; -f $local && -s _ }; # no ALLO if sending data from a pipe
    $ftp->_ALLO($size) if $size;
   }
  croak("Bad remote filename '$remote'\n")