From: Rafael Garcia-Suarez Date: Thu, 15 Nov 2007 07:55:08 +0000 (+0000) Subject: Update File::Fetch to 0.13_04 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5e6d05d20c243d88ee1890c69c618bae4d5dcf64;p=p5sagit%2Fp5-mst-13.2.git Update File::Fetch to 0.13_04 p4raw-id: //depot/perl@32323 --- diff --git a/lib/File/Fetch.pm b/lib/File/Fetch.pm index 235b4e3..01227fe 100644 --- a/lib/File/Fetch.pm +++ b/lib/File/Fetch.pm @@ -299,7 +299,7 @@ sub new { ### ### In the case of file:// urls there maybe be additional fields ### -### For systems with volume specifications such as Win32 there will be +### For systems with volume specifications such as Win32 there will be ### a volume specifier provided in the 'vol' field. ### ### 'vol' => 'volumename' @@ -418,7 +418,7 @@ sub fetch { check( $tmpl, \%hash ) or return; - # On VMS force to VMS format so File::Spec will work. + ### On VMS force to VMS format so File::Spec will work. $to = VMS::Filespec::vmspath($to) if ON_VMS; ### create the path if it doesn't exist yet ### @@ -919,12 +919,12 @@ sub _file_fetch { $remote = "\\\\".$self->host."\\$share\\$path"; } else { - if (ON_VMS) { - # File::Spec on VMS can not currently handle UNIX syntax. - $remote = File::Spec::Unix->catfile( $path, $self->file ); - } else { - $remote = File::Spec->catfile( $path, $self->file ); - } + ### File::Spec on VMS can not currently handle UNIX syntax. + my $file_class = ON_VMS + ? 'File::Spec::Unix' + : 'File::Spec'; + + $remote = $file_class->catfile( $path, $self->file ); } ### File::Copy is littered with 'die' statements :( ###