diff options
author | Craig A. Berry <craigberry@mac.com> | 2001-10-08 10:40:43 -0500 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-10-08 20:41:50 +0000 |
commit | 64a3d80f001e333a9280dbb6ecc790d2991874df (patch) | |
tree | 1c05a44dbbf9cc603e0e2c2522665c20e17a9612 /lib/AutoSplit.pm | |
parent | f29f446bc2ad9f83053ad691d140520a7eb3c59a (diff) | |
download | perl-64a3d80f001e333a9280dbb6ecc790d2991874df.tar.gz |
Autosplit patch for VMS
Message-Id: <5.1.0.14.0.20011008150808.02302618@exchi01>
p4raw-id: //depot/perl@12365
Diffstat (limited to 'lib/AutoSplit.pm')
-rw-r--r-- | lib/AutoSplit.pm | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/lib/AutoSplit.pm b/lib/AutoSplit.pm index ae119d3d1b..bf4d811454 100644 --- a/lib/AutoSplit.pm +++ b/lib/AutoSplit.pm @@ -6,7 +6,7 @@ use Config qw(%Config); use Carp qw(carp); use File::Basename (); use File::Path qw(mkpath); -use File::Spec::Functions qw(curdir catfile); +use File::Spec::Functions qw(curdir catfile catdir); use strict; our($VERSION, @ISA, @EXPORT, @EXPORT_OK, $Verbose, $Keep, $Maxlen, $CheckForAutoloader, $CheckModTime); @@ -255,9 +255,6 @@ sub autosplit_file { $def_package or die "Can't find 'package Name;' in $filename\n"; my($modpname) = _modpname($def_package); - if ($Is_VMS) { - $modpname = VMS::Filespec::unixify($modpname); # may have dirs - } # this _has_ to match so we have a reasonable timestamp file die "Package $def_package ($modpname.pm) does not ". @@ -278,7 +275,7 @@ sub autosplit_file { } } - my($modnamedir) = catfile($autodir, $modpname); + my($modnamedir) = catdir($autodir, $modpname); print "AutoSplitting $filename ($modnamedir)\n" if $Verbose; @@ -326,7 +323,7 @@ sub autosplit_file { push(@subnames, $fq_subname); my($lname, $sname) = ($subname, substr($subname,0,$maxflen-3)); $modpname = _modpname($this_package); - my($modnamedir) = catfile($autodir, $modpname); + my($modnamedir) = catdir($autodir, $modpname); mkpath($modnamedir,0,0777); my($lpath) = catfile($modnamedir, "$lname.al"); my($spath) = catfile($modnamedir, "$sname.al"); @@ -435,9 +432,15 @@ sub _modpname ($) { if ($^O eq 'MSWin32') { $modpname =~ s#::#\\#g; } else { - while ($modpname =~ m#(.*?[^:])::([^:].*)#) { - $modpname = catfile($1, $2); - } + my @modpnames = (); + while ($modpname =~ m#(.*?[^:])::([^:].*)#) { + push @modpnames, $1; + $modpname = $2; + } + $modpname = catfile(@modpnames, $modpname); + } + if ($Is_VMS) { + $modpname = VMS::Filespec::unixify($modpname); # may have dirs } $modpname; } |