X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FFile%2FFetch.pm;h=8c8b3f90a573a2fe9bfd6ab1bf2ab7ea901424f6;hb=68c65ec0adda9d2b3fc21f30f68be0ef10de5ad8;hp=235b4e351cd8d61354ff53925272b5fbd123da3f;hpb=1f80753b60b5b911f4c06c6d6b20d889c978eaed;p=p5sagit%2Fp5-mst-13.2.git diff --git a/lib/File/Fetch.pm b/lib/File/Fetch.pm index 235b4e3..8c8b3f9 100644 --- a/lib/File/Fetch.pm +++ b/lib/File/Fetch.pm @@ -23,7 +23,7 @@ use vars qw[ $VERBOSE $PREFER_BIN $FROM_EMAIL $USER_AGENT use constant QUOTE => do { $^O eq 'MSWin32' ? q["] : q['] }; -$VERSION = '0.13_04'; +$VERSION = '0.14'; $VERSION = eval $VERSION; # avoid warnings with development releases $PREFER_BIN = 0; # XXX TODO implement $FROM_EMAIL = 'File-Fetch@example.com'; @@ -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 :( ###