From 9d56ca6fe0c5e4768e3d1c7533298002d30c6e47 Mon Sep 17 00:00:00 2001 From: Chris 'BinGOs' Williams Date: Sat, 25 Jan 2014 13:35:57 +0000 Subject: [PATCH] Update File-Fetch to CPAN version 0.48 [DELTA] 0.48 Fri Jan 24 10:32:52 2014 * Force curl to be IPv4 only during testing on NetBSD --- Porting/Maintainers.pl | 2 +- cpan/File-Fetch/lib/File/Fetch.pm | 7 +++++-- cpan/File-Fetch/t/01_File-Fetch.t | 2 ++ 3 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Porting/Maintainers.pl b/Porting/Maintainers.pl index 72703d5..0eee41f 100755 --- a/Porting/Maintainers.pl +++ b/Porting/Maintainers.pl @@ -498,7 +498,7 @@ use File::Glob qw(:case); }, 'File::Fetch' => { - 'DISTRIBUTION' => 'BINGOS/File-Fetch-0.46.tar.gz', + 'DISTRIBUTION' => 'BINGOS/File-Fetch-0.48.tar.gz', 'FILES' => q[cpan/File-Fetch], }, diff --git a/cpan/File-Fetch/lib/File/Fetch.pm b/cpan/File-Fetch/lib/File/Fetch.pm index 8d512a3..7d6a263 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 e4fdccf..b4443e6 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[ -- 2.7.4