Update File-Fetch to CPAN version 0.48
authorChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Sat, 25 Jan 2014 13:35:57 +0000 (13:35 +0000)
committerChris 'BinGOs' Williams <chris@bingosnet.co.uk>
Sat, 25 Jan 2014 13:35:57 +0000 (13:35 +0000)
  [DELTA]

0.48        Fri Jan 24 10:32:52 2014

* Force curl to be IPv4 only during testing
  on NetBSD

Porting/Maintainers.pl
cpan/File-Fetch/lib/File/Fetch.pm
cpan/File-Fetch/t/01_File-Fetch.t

index 72703d5..0eee41f 100755 (executable)
@@ -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],
     },
 
index 8d512a3..7d6a263 100644 (file)
@@ -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;
index e4fdccf..b4443e6 100644 (file)
@@ -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[