In perl.git, the branch maint-5.10 has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/0b88e241bb295984cbd4eb10a5cceae527ef30ec?hp=aee5fda364bac107f73f9ce92d939345886bd7f6>

- Log -----------------------------------------------------------------
commit 0b88e241bb295984cbd4eb10a5cceae527ef30ec
Author: Steve Hay <[email protected]>
Date:   Fri Dec 19 14:38:14 2008 +0000

    Subject: [PATCH] Update File::Fetch to 0.18
    From: "Jos I. Boumans" <[email protected]>
    Date: Wed, 17 Dec 2008 14:22:13 +0100
    Message-Id: <[email protected]>
    
    (cherry picked from commit 6b6e6e926fbaa8fd5416b8b6996454222feffccd)
-----------------------------------------------------------------------

Summary of changes:
 lib/File/Fetch.pm                |   23 +++++++++++------------
 lib/File/Fetch/t/01_File-Fetch.t |    7 +++++++
 2 files changed, 18 insertions(+), 12 deletions(-)

diff --git a/lib/File/Fetch.pm b/lib/File/Fetch.pm
index 4293fb9..03bf147 100644
--- a/lib/File/Fetch.pm
+++ b/lib/File/Fetch.pm
@@ -10,7 +10,7 @@ use File::Basename              qw[dirname];
 
 use Cwd                         qw[cwd];
 use Carp                        qw[carp];
-use IPC::Cmd                    qw[can_run run];
+use IPC::Cmd                    qw[can_run run QUOTE];
 use File::Path                  qw[mkpath];
 use Params::Check               qw[check];
 use Module::Load::Conditional   qw[can_load];
@@ -21,14 +21,11 @@ use vars    qw[ $VERBOSE $PREFER_BIN $FROM_EMAIL $USER_AGENT
                 $FTP_PASSIVE $TIMEOUT $DEBUG $WARN
             ];
 
-use constant QUOTE  => do { $^O eq 'MSWin32' ? q["] : q['] };            
-            
-
-$VERSION        = '0.16';
+$VERSION        = '0.18';
 $VERSION        = eval $VERSION;    # avoid warnings with development releases
 $PREFER_BIN     = 0;                # XXX TODO implement
 $FROM_EMAIL     = '[email protected]';
-$USER_AGENT     = 'File::Fetch/$VERSION';
+$USER_AGENT     = "File::Fetch/$VERSION";
 $BLACKLIST      = [qw|ftp|];
 $METHOD_FAIL    = { };
 $FTP_PASSIVE    = 1;
@@ -51,11 +48,13 @@ local $Module::Load::Conditional::VERBOSE   = 0;
 local $Module::Load::Conditional::VERBOSE   = 0;
 
 ### see what OS we are on, important for file:// uris ###
-use constant ON_WIN         => ($^O eq 'MSWin32');
-use constant ON_VMS         => ($^O eq 'VMS');                                
-use constant ON_UNIX        => (!ON_WIN);
-use constant HAS_VOL        => (ON_WIN);
-use constant HAS_SHARE      => (ON_WIN);
+use constant ON_WIN     => ($^O eq 'MSWin32');
+use constant ON_VMS     => ($^O eq 'VMS');                                
+use constant ON_UNIX    => (!ON_WIN);
+use constant HAS_VOL    => (ON_WIN);
+use constant HAS_SHARE  => (ON_WIN);
+
+
 =pod
 
 =head1 NAME
@@ -147,7 +146,7 @@ result of $ff->output_file will be used.
 ##########################
 
 {
-    ### template for new() and autogenerated accessors ###
+    ### template for autogenerated accessors ###
     my $Tmpl = {
         scheme          => { default => 'http' },
         host            => { default => 'localhost' },
diff --git a/lib/File/Fetch/t/01_File-Fetch.t b/lib/File/Fetch/t/01_File-Fetch.t
index af41f98..519ca27 100644
--- a/lib/File/Fetch/t/01_File-Fetch.t
+++ b/lib/File/Fetch/t/01_File-Fetch.t
@@ -115,6 +115,13 @@ push @map, (
 ) if &File::Fetch::ON_WIN;
 
 
+### sanity tests
+{   like( $File::Fetch::USER_AGENT, qr/$File::Fetch::VERSION/,
+                                "User agent contains version" );
+    like( $File::Fetch::FROM_EMAIL, qr/@/,
+                                q[Email contains '@'] );
+}                                
+
 ### parse uri tests ###
 for my $entry (@map ) {
     my $uri = $entry->{'uri'};

--
Perl5 Master Repository

Reply via email to