diff options
Diffstat (limited to 'cpan/File-Fetch')
-rw-r--r-- | cpan/File-Fetch/lib/File/Fetch.pm | 7 | ||||
-rw-r--r-- | cpan/File-Fetch/t/01_File-Fetch.t | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/cpan/File-Fetch/lib/File/Fetch.pm b/cpan/File-Fetch/lib/File/Fetch.pm index 8d512a300c..7d6a263e2b 100644 --- a/cpan/File-Fetch/lib/File/Fetch.pm +++ b/cpan/File-Fetch/lib/File/Fetch.pm @@ -19,10 +19,10 @@ use Locale::Maketext::Simple Style => 'gettext'; use vars qw[ $VERBOSE $PREFER_BIN $FROM_EMAIL $USER_AGENT $BLACKLIST $METHOD_FAIL $VERSION $METHODS - $FTP_PASSIVE $TIMEOUT $DEBUG $WARN + $FTP_PASSIVE $TIMEOUT $DEBUG $WARN $FORCEIPV4 ]; -$VERSION = '0.46'; +$VERSION = '0.48'; $VERSION = eval $VERSION; # avoid warnings with development releases $PREFER_BIN = 0; # XXX TODO implement $FROM_EMAIL = 'File-Fetch@example.com'; @@ -34,6 +34,7 @@ $FTP_PASSIVE = 1; $TIMEOUT = 0; $DEBUG = 0; $WARN = 1; +$FORCEIPV4 = 0; ### methods available to fetch the file depending on the scheme $METHODS = { @@ -1196,6 +1197,8 @@ sub _curl_fetch { ### these long opts are self explanatory - I like that -jmb my $cmd = [ $curl, '-q' ]; + push(@$cmd, '-4') if $^O eq 'netbsd' && $FORCEIPV4; # only seen this on NetBSD so far + push(@$cmd, '--connect-timeout', $TIMEOUT) if $TIMEOUT; push(@$cmd, '--silent') unless $DEBUG; diff --git a/cpan/File-Fetch/t/01_File-Fetch.t b/cpan/File-Fetch/t/01_File-Fetch.t index e4fdccf27c..b4443e658b 100644 --- a/cpan/File-Fetch/t/01_File-Fetch.t +++ b/cpan/File-Fetch/t/01_File-Fetch.t @@ -16,6 +16,8 @@ use_ok('File::Fetch'); $File::Fetch::DEBUG = $File::Fetch::DEBUG = 1 if $ARGV[0]; $IPC::Cmd::DEBUG = $IPC::Cmd::DEBUG = 1 if $ARGV[0]; +$File::Fetch::FORCEIPV4=1; + unless( $ENV{PERL_CORE} ) { warn qq[ |