From 5e6d05d20c243d88ee1890c69c618bae4d5dcf64 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Thu, 15 Nov 2007 07:55:08 +0000 Subject: [PATCH] Update File::Fetch to 0.13_04 p4raw-id: //depot/perl@32323 --- lib/File/Fetch.pm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) 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 :( ### -- 2.7.4