X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FNet%2FConfig.pm;h=185f2927cb71140bb36e40f2e78cbf0644210be5;hb=8460ac15db2c40d1c6f63e30e61207343dddc0f6;hp=c09b834fcf65091b3ed2611825ab64d2e0fea6b0;hpb=c85707204c5d2a93ef021c88e43a92ba2d602304;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/Net/Config.pm b/lib/Net/Config.pm index c09b834..185f292 100644 --- a/lib/Net/Config.pm +++ b/lib/Net/Config.pm @@ -13,7 +13,7 @@ use strict; @EXPORT = qw(%NetConfig); @ISA = qw(Net::LocalCfg Exporter); -$VERSION = "1.09"; # $Id: //depot/libnet/Net/Config.pm#16 $ +$VERSION = "1.10"; # $Id: //depot/libnet/Net/Config.pm#17 $ eval { local $SIG{__DIE__}; require Net::LocalCfg }; @@ -27,8 +27,8 @@ eval { local $SIG{__DIE__}; require Net::LocalCfg }; time_hosts => [], inet_domain => undef, ftp_firewall => undef, - ftp_ext_passive => 0, - ftp_int_passive => 0, + ftp_ext_passive => 1, + ftp_int_passive => 1, test_hosts => 1, test_exist => 1, ); @@ -36,24 +36,24 @@ eval { local $SIG{__DIE__}; require Net::LocalCfg }; # # Try to get as much configuration info as possible from InternetConfig # -$^O eq 'MacOS' and eval <<'TRY_INTERNET_CONFIG'; +$^O eq 'MacOS' and eval < [ $InternetConfig{ kICNNTPHost()} ], - pop3_hosts => [ $InternetConfig{ kICMailAccount()} =~ /@(.*)/ ], - smtp_hosts => [ $InternetConfig{ kICSMTPHost()} ], - ftp_testhost => [ $InternetConfig{ kICFTPHost()} ], - ph_hosts => [ $InternetConfig{ kICPhHost()} ], - ftp_ext_passive => $InternetConfig{"646F676F€UsePassiveMode"} || 0, - ftp_int_passive => $InternetConfig{"646F676F€UsePassiveMode"} || 0, + nntp_hosts => [ \$InternetConfig{ kICNNTPHost() } ], + pop3_hosts => [ \$InternetConfig{ kICMailAccount() } =~ /\@(.*)/ ], + smtp_hosts => [ \$InternetConfig{ kICSMTPHost() } ], + ftp_testhost => \$InternetConfig{ kICFTPHost() } ? \$InternetConfig{ kICFTPHost()} : undef, + ph_hosts => [ \$InternetConfig{ kICPhHost() } ], + ftp_ext_passive => \$InternetConfig{"646F676F\xA5UsePassiveMode"} || 0, + ftp_int_passive => \$InternetConfig{"646F676F\xA5UsePassiveMode"} || 0, socks_hosts => - $InternetConfig{kICUseSocks()} ? [ $InternetConfig{kICSocksHost()} ] : [], + \$InternetConfig{ kICUseSocks() } ? [ \$InternetConfig{ kICSocksHost() } ] : [], ftp_firewall => - $InternetConfig{kICUseFTPProxy()} ? [ $InternetConfig{kICFTPProxyHost()} ] : [], + \$InternetConfig{ kICUseFTPProxy() } ? [ \$InternetConfig{ kICFTPProxyHost() } ] : [], ); -@NetConfig{keys %nc} = values %nc; +\@NetConfig{keys %nc} = values %nc; } TRY_INTERNET_CONFIG @@ -129,7 +129,7 @@ Net::Config - Local configuration data for libnet =head1 DESCRIPTION C holds configuration data for the modules in the libnet -distribuion. During installation you will be asked for these values. +distribution. During installation you will be asked for these values. The configuration data is held globally in a file in the perl installation tree, but a user may override any of these values by providing their own. This @@ -139,7 +139,7 @@ For example # .libnetrc { - nntp_hosts => [ "my_prefered_host" ], + nntp_hosts => [ "my_preferred_host" ], ph_hosts => [ "my_ph_server" ], } __END__ @@ -267,13 +267,14 @@ There is no firewall =item ftp_ext_passive -=item ftp_int_pasive +=item ftp_int_passive -FTP servers normally work on a non-passive mode. That is when you want to -transfer data you have to tell the server the address and port to -connect to. +FTP servers can work in passive or active mode. Active mode is when +you want to transfer data you have to tell the server the address and +port to connect to. Passive mode is when the server provide the +address and port and you establish the connection. -With some firewalls this does not work as the server cannot +With some firewalls active mode does not work as the server cannot connect to your machine (because you are behind a firewall) and the firewall does not re-write the command. In this case you should set C to a I value. @@ -309,6 +310,6 @@ If true then C will check each hostname given that it exists =for html
-I<$Id: //depot/libnet/Net/Config.pm#16 $> +I<$Id: //depot/libnet/Net/Config.pm#17 $> =cut