about summary refs log tree commit
diff options
context:
space:
mode:
authorGraham Barr <gbarr@pobox.com>1997-09-27 02:43:48 +0000
committerGraham Barr <gbarr@pobox.com>1997-09-27 02:43:48 +0000
commit4050a15e5a5d82fca52f76f65b02dda1b77329e2 (patch)
treec3943c01626957c102d167e338eef6db0511aaf3
parent6c3e480d86e66d16488cfb4c391596b783da8fc5 (diff)
downloadperl-libnet-4050a15e5a5d82fca52f76f65b02dda1b77329e2.tar.gz
Net::FTP
- Modified code which determined whether to connect via a Firewall.
  if the Firewall wall option is passed then it will be used,
  reguardless of whether the real machine can be reached.
- The Firewall option to new is now used in preference over
  the FTP_FIREWALL environment variable.

-rw-r--r--Net/Cmd.pm2
-rw-r--r--Net/FTP.pm9
2 files changed, 6 insertions, 5 deletions
diff --git a/Net/Cmd.pm b/Net/Cmd.pm
index 5d364c9..e21ddf7 100644
--- a/Net/Cmd.pm
+++ b/Net/Cmd.pm
@@ -13,7 +13,7 @@ use strict;
 use vars qw(@ISA @EXPORT $VERSION);
 use Carp;
 
-$VERSION = "2.0801";
+$VERSION = "2.09";
 @ISA     = qw(Exporter);
 @EXPORT  = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);
 
diff --git a/Net/FTP.pm b/Net/FTP.pm
index 43c98a7..4a78f9f 100644
--- a/Net/FTP.pm
+++ b/Net/FTP.pm
@@ -21,7 +21,7 @@ use Net::Cmd;
 use Net::Config;
 use AutoLoader qw(AUTOLOAD);
 
-$VERSION = "2.22";
+$VERSION = "2.23";
 @ISA     = qw(Exporter Net::Cmd IO::Socket::INET);
 
 1;
@@ -37,10 +37,11 @@ sub new
  my $host = $peer;
  my $fire = undef;
 
- unless(defined inet_aton($peer)) # GMB: Should I use Net::Ping here ??
+ # Should I use Net::Ping here ?? --GMB
+ if(exists($arg{Firewall}) || !defined(inet_aton($peer)))
   {
-   $fire = $ENV{FTP_FIREWALL}
-        || $arg{Firewall}
+   $fire = $arg{Firewall}
+        || $ENV{FTP_FIREWALL}
         || $NetConfig{ftp_firewall}
         || undef;