In perl.git, the branch blead has been updated

<http://perl5.git.perl.org/perl.git/commitdiff/0a660800cec9a8840a32154f6d5191c619c1c49d?hp=31b42f2e3560656f5b499423a3e567c017a8c89a>

- Log -----------------------------------------------------------------
commit 0a660800cec9a8840a32154f6d5191c619c1c49d
Author: Craig A. Berry <[email protected]>
Date:   Tue Dec 2 22:09:12 2014 -0600

    Eliminate eliminate_macros and fixpath.
    
    These functions have been deprecated outside of MakeMaker for
    many years, but due to the complicated inheritance situation
    in EUMM have been difficult to get rid of because sometimes the
    File::Spec versions would get called when we thought we were
    calling the MakeMaker versions.  As of MakeMaker 7.04, the last
    call to the File::Spec version of fixpath is gone, so we can
    finally remove these from File::Spec.
    
    And bump PathTools versions once again.
-----------------------------------------------------------------------

Summary of changes:
 dist/PathTools/Cwd.pm                     |   2 +-
 dist/PathTools/lib/File/Spec/Cygwin.pm    |   2 +-
 dist/PathTools/lib/File/Spec/Epoc.pm      |   2 +-
 dist/PathTools/lib/File/Spec/Functions.pm |   2 +-
 dist/PathTools/lib/File/Spec/Mac.pm       |   2 +-
 dist/PathTools/lib/File/Spec/OS2.pm       |   2 +-
 dist/PathTools/lib/File/Spec/Unix.pm      |   2 +-
 dist/PathTools/lib/File/Spec/VMS.pm       | 121 +-----------------------------
 dist/PathTools/lib/File/Spec/Win32.pm     |   2 +-
 9 files changed, 12 insertions(+), 125 deletions(-)

diff --git a/dist/PathTools/Cwd.pm b/dist/PathTools/Cwd.pm
index a9b0da9..1811a24 100644
--- a/dist/PathTools/Cwd.pm
+++ b/dist/PathTools/Cwd.pm
@@ -3,7 +3,7 @@ use strict;
 use Exporter;
 use vars qw(@ISA @EXPORT @EXPORT_OK $VERSION);
 
-$VERSION = '3.53';
+$VERSION = '3.54';
 my $xs_version = $VERSION;
 $VERSION =~ tr/_//;
 
diff --git a/dist/PathTools/lib/File/Spec/Cygwin.pm 
b/dist/PathTools/lib/File/Spec/Cygwin.pm
index c9ca9bd..c81292c 100644
--- a/dist/PathTools/lib/File/Spec/Cygwin.pm
+++ b/dist/PathTools/lib/File/Spec/Cygwin.pm
@@ -4,7 +4,7 @@ use strict;
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.53';
+$VERSION = '3.54';
 $VERSION =~ tr/_//;
 
 @ISA = qw(File::Spec::Unix);
diff --git a/dist/PathTools/lib/File/Spec/Epoc.pm 
b/dist/PathTools/lib/File/Spec/Epoc.pm
index 18a3c8a..0f9f71a 100644
--- a/dist/PathTools/lib/File/Spec/Epoc.pm
+++ b/dist/PathTools/lib/File/Spec/Epoc.pm
@@ -3,7 +3,7 @@ package File::Spec::Epoc;
 use strict;
 use vars qw($VERSION @ISA);
 
-$VERSION = '3.53';
+$VERSION = '3.54';
 $VERSION =~ tr/_//;
 
 require File::Spec::Unix;
diff --git a/dist/PathTools/lib/File/Spec/Functions.pm 
b/dist/PathTools/lib/File/Spec/Functions.pm
index 304f8b4..3f87865 100644
--- a/dist/PathTools/lib/File/Spec/Functions.pm
+++ b/dist/PathTools/lib/File/Spec/Functions.pm
@@ -5,7 +5,7 @@ use strict;
 
 use vars qw(@ISA @EXPORT @EXPORT_OK %EXPORT_TAGS $VERSION);
 
-$VERSION = '3.53';
+$VERSION = '3.54';
 $VERSION =~ tr/_//;
 
 require Exporter;
diff --git a/dist/PathTools/lib/File/Spec/Mac.pm 
b/dist/PathTools/lib/File/Spec/Mac.pm
index ac2521c..7aaf302 100644
--- a/dist/PathTools/lib/File/Spec/Mac.pm
+++ b/dist/PathTools/lib/File/Spec/Mac.pm
@@ -4,7 +4,7 @@ use strict;
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.53';
+$VERSION = '3.54';
 $VERSION =~ tr/_//;
 
 @ISA = qw(File::Spec::Unix);
diff --git a/dist/PathTools/lib/File/Spec/OS2.pm 
b/dist/PathTools/lib/File/Spec/OS2.pm
index 5fd3144..291ac97 100644
--- a/dist/PathTools/lib/File/Spec/OS2.pm
+++ b/dist/PathTools/lib/File/Spec/OS2.pm
@@ -4,7 +4,7 @@ use strict;
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.53';
+$VERSION = '3.54';
 $VERSION =~ tr/_//;
 
 @ISA = qw(File::Spec::Unix);
diff --git a/dist/PathTools/lib/File/Spec/Unix.pm 
b/dist/PathTools/lib/File/Spec/Unix.pm
index fef998a..6860209 100644
--- a/dist/PathTools/lib/File/Spec/Unix.pm
+++ b/dist/PathTools/lib/File/Spec/Unix.pm
@@ -3,7 +3,7 @@ package File::Spec::Unix;
 use strict;
 use vars qw($VERSION);
 
-$VERSION = '3.53';
+$VERSION = '3.54';
 my $xs_version = $VERSION;
 $VERSION =~ tr/_//;
 
diff --git a/dist/PathTools/lib/File/Spec/VMS.pm 
b/dist/PathTools/lib/File/Spec/VMS.pm
index 331f7e3..1fe08a8 100644
--- a/dist/PathTools/lib/File/Spec/VMS.pm
+++ b/dist/PathTools/lib/File/Spec/VMS.pm
@@ -4,7 +4,7 @@ use strict;
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.53';
+$VERSION = '3.54';
 $VERSION =~ tr/_//;
 
 @ISA = qw(File::Spec::Unix);
@@ -144,8 +144,7 @@ sub catdir {
             return $self->SUPER::catdir($spath, $sdir)
        }
 
-       $sdir = $self->eliminate_macros($sdir) unless $sdir =~ 
/^[\w\-]+\Z(?!\n)/s;
-       $rslt = $self->fixpath($self->eliminate_macros($spath)."/$sdir",1);
+       $rslt = vmspath( unixify($spath) . '/' . unixify($sdir));
 
        # Special case for VMS absolute directory specs: these will have
        # had device prepended during trip through Unix syntax in
@@ -195,7 +194,7 @@ sub catfile {
        if ($spath =~ /^(?<!\^)[^\)\]\/:>]+\)\Z(?!\n)/s && basename($file) eq 
$file) {
            $rslt = "$spath$file";
        } else {
-           $rslt = $self->eliminate_macros($spath);
+           $rslt = unixify($spath);
            $rslt .= (defined($rslt) && length($rslt) ? '/' : '') . 
unixify($file);
            $rslt = vmsify($rslt) unless $unix_rpt;
        }
@@ -547,123 +546,11 @@ sub rel2abs {
 }
 
 
-# eliminate_macros() and fixpath() are MakeMaker-specific methods
-# which are used inside catfile() and catdir().  MakeMaker has its own
-# copies as of 6.06_03 which are the canonical ones.  We leave these
-# here, in peace, so that File::Spec continues to work with MakeMakers
-# prior to 6.06_03.
-# 
-# Please consider these two methods deprecated.  Do not patch them,
-# patch the ones in ExtUtils::MM_VMS instead.
-#
-# Update:  MakeMaker 6.48 is still using these routines on VMS.
-# so they need to be kept up to date with ExtUtils::MM_VMS.
-
-sub eliminate_macros {
-    my($self,$path) = @_;
-    return '' unless (defined $path) && ($path ne '');
-    $self = {} unless ref $self;
-
-    if ($path =~ /\s/) {
-      return join ' ', map { $self->eliminate_macros($_) } split /\s+/, $path;
-    }
-
-    my $npath = unixify($path);
-    # sometimes unixify will return a string with an off-by-one trailing null
-    $npath =~ s{\0$}{};
-
-    my($complex) = 0;
-    my($head,$macro,$tail);
-
-    # perform m##g in scalar context so it acts as an iterator
-    while ($npath =~ m#(.*?)\$\((\S+?)\)(.*)#gs) { 
-        if (defined $self->{$2}) {
-            ($head,$macro,$tail) = ($1,$2,$3);
-            if (ref $self->{$macro}) {
-                if (ref $self->{$macro} eq 'ARRAY') {
-                    $macro = join ' ', @{$self->{$macro}};
-                }
-                else {
-                    print "Note: can't expand macro \$($macro) containing 
",ref($self->{$macro}),
-                          "\n\t(using MMK-specific deferred substitutuon; MMS 
will break)\n";
-                    $macro = "\cB$macro\cB";
-                    $complex = 1;
-                }
-            }
-            else { ($macro = unixify($self->{$macro})) =~ s#/\Z(?!\n)##; }
-            $npath = "$head$macro$tail";
-        }
-    }
-    if ($complex) { $npath =~ s#\cB(.*?)\cB#\${$1}#gs; }
-    $npath;
-}
-
-# Deprecated.  See the note above for eliminate_macros().
-
-# Catchall routine to clean up problem MM[SK]/Make macros.  Expands macros
-# in any directory specification, in order to avoid juxtaposing two
-# VMS-syntax directories when MM[SK] is run.  Also expands expressions which
-# are all macro, so that we can tell how long the expansion is, and avoid
-# overrunning DCL's command buffer when MM[KS] is running.
-
-# fixpath() checks to see whether the result matches the name of a
-# directory in the current default directory and returns a directory or
-# file specification accordingly.  C<$is_dir> can be set to true to
-# force fixpath() to consider the path to be a directory or false to force
-# it to be a file.
-
-sub fixpath {
-    my($self,$path,$force_path) = @_;
-    return '' unless $path;
-    $self = bless {}, $self unless ref $self;
-    my($fixedpath,$prefix,$name);
-
-    if ($path =~ /\s/) {
-      return join ' ',
-             map { $self->fixpath($_,$force_path) }
-            split /\s+/, $path;
-    }
-
-    if ($path =~ m#^\$\([^\)]+\)\Z(?!\n)#s || $path =~ m#[/:>\]]#) { 
-        if ($force_path or $path =~ /(?:DIR\)|\])\Z(?!\n)/) {
-            $fixedpath = vmspath($self->eliminate_macros($path));
-        }
-        else {
-            $fixedpath = vmsify($self->eliminate_macros($path));
-        }
-    }
-    elsif ((($prefix,$name) = ($path =~ m#^\$\(([^\)]+)\)(.+)#s)) && 
$self->{$prefix}) {
-        my($vmspre) = $self->eliminate_macros("\$($prefix)");
-        # is it a dir or just a name?
-        $vmspre = ($vmspre =~ m|/| or $prefix =~ /DIR\Z(?!\n)/) ? 
vmspath($vmspre) : '';
-        $fixedpath = ($vmspre ? $vmspre : $self->{$prefix}) . $name;
-        $fixedpath = vmspath($fixedpath) if $force_path;
-    }
-    else {
-        $fixedpath = $path;
-        $fixedpath = vmspath($fixedpath) if $force_path;
-    }
-    # No hints, so we try to guess
-    if (!defined($force_path) and $fixedpath !~ /[:>(.\]]/) {
-        $fixedpath = vmspath($fixedpath) if -d $fixedpath;
-    }
-
-    # Trim off root dirname if it's had other dirs inserted in front of it.
-    $fixedpath =~ s/\.000000([\]>])/$1/;
-    # Special case for VMS absolute directory specs: these will have had device
-    # prepended during trip through Unix syntax in eliminate_macros(), since
-    # Unix syntax has no way to express "absolute from the top of this device's
-    # directory tree".
-    if ($path =~ /^[\[>][^.\-]/) { $fixedpath =~ s/^[^\[<]+//; }
-    $fixedpath;
-}
-
-
 =back
 
 =head1 COPYRIGHT
 
-Copyright (c) 2004 by the Perl 5 Porters.  All rights reserved.
+Copyright (c) 2004-14 by the Perl 5 Porters.  All rights reserved.
 
 This program is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself.
diff --git a/dist/PathTools/lib/File/Spec/Win32.pm 
b/dist/PathTools/lib/File/Spec/Win32.pm
index debefc9..d148271 100644
--- a/dist/PathTools/lib/File/Spec/Win32.pm
+++ b/dist/PathTools/lib/File/Spec/Win32.pm
@@ -5,7 +5,7 @@ use strict;
 use vars qw(@ISA $VERSION);
 require File::Spec::Unix;
 
-$VERSION = '3.53';
+$VERSION = '3.54';
 $VERSION =~ tr/_//;
 
 @ISA = qw(File::Spec::Unix);

--
Perl5 Master Repository

Reply via email to