develooper Front page | perl.perl5.porters | Postings from January 2003

[PATCH] Net::FTP - get firewall type from Net::Config

From:
Newton, Philip
Date:
January 28, 2003 02:35
Subject:
[PATCH] Net::FTP - get firewall type from Net::Config
Message ID:
C9A98F2128EDD411B0920008C7B337A13DD09B@hamsem01.de.gedas.vwg
I'm playing around with fetching things from the CPAN shell here. We have an
FTP and an HTTP proxy here.

While stepping through things in the debugger, I notice that Net::FTP::new
loads $fire from $arg{Firewall} || $ENV{FTP_FIREWALL} ||
$NetConfig{ftp_firewall} || undef; $fire_type is initialised similarly but
%NetConfig is not consulted. Is this deliberate? If not, I suggest the
following patch:

--- /home/pne/tmp/install/perl-5.8.0/lib/Net/FTP.pm	Sat Jun  1 19:03:20
2002
+++ /home/pne/lib/perl5/5.8.0/Net/FTP.pm	Tue Jan 28 11:29:10 2003
@@ -70,6 +70,7 @@
      delete $arg{Port};
 	 $fire_type = $arg{FirewallType}
 	 || $ENV{FTP_FIREWALL_TYPE}
+	 || $NetConfig{firewall_type}
 	 || undef;
     }
   }
End of patch.

Oh -- this is for Net::FTP v2.65.

Cheers,
Philip
-- 
Philip Newton <Philip.Newton@datenrevision.de>
All opinions are my own, not my employer's.
If you're not part of the solution, you're part of the precipitate.



nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About