This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
remove support for running PathTools on MacOS
authorZefram <zefram@fysh.org>
Mon, 18 Dec 2017 03:18:39 +0000 (03:18 +0000)
committerZefram <zefram@fysh.org>
Mon, 18 Dec 2017 03:18:39 +0000 (03:18 +0000)
MacOS Classic hasn't been a supported platform since 5.14.  Note that
the code for processing MacOS-style paths remains, and can be run on
supported platforms.  [perl #130818]

dist/PathTools/Cwd.pm
dist/PathTools/lib/File/Spec.pm
dist/PathTools/lib/File/Spec/Mac.pm

index 8f1d406..1f94997 100644 (file)
@@ -135,14 +135,6 @@ my %METHOD_MAP =
     realpath           => 'fast_abs_path',
    },
 
-   MacOS =>
-   {
-    getcwd             => 'cwd',
-    fastgetcwd         => 'cwd',
-    fastcwd            => 'cwd',
-    abs_path           => 'fast_abs_path',
-   },
-
    amigaos =>
    {
     getcwd              => '_backtick_pwd',
@@ -235,8 +227,7 @@ unless ($METHOD_MAP{$^O}{cwd} or defined &cwd) {
        }
     }
 
-    # MacOS has some special magic to make `pwd` work.
-    if( $os eq 'MacOS' || $found_pwd_cmd )
+    if( $found_pwd_cmd )
     {
        *cwd = \&_backtick_pwd;
     }
@@ -365,9 +356,6 @@ sub chdir {
     if ($^O eq 'VMS') {
        return $ENV{'PWD'} = $ENV{'DEFAULT'}
     }
-    elsif ($^O eq 'MacOS') {
-       return $ENV{'PWD'} = cwd();
-    }
     elsif ($^O eq 'MSWin32') {
        $ENV{'PWD'} = $newpwd;
        return 1;
index b09ed6b..954a01d 100644 (file)
@@ -5,7 +5,7 @@ use strict;
 our $VERSION = '3.70';
 $VERSION =~ tr/_//d;
 
-my %module = (MacOS   => 'Mac',
+my %module = (
              MSWin32 => 'Win32',
              os2     => 'OS2',
              VMS     => 'VMS',
index 30e3a01..34f0f30 100644 (file)
@@ -9,11 +9,6 @@ $VERSION =~ tr/_//d;
 
 our @ISA = qw(File::Spec::Unix);
 
-my $macfiles;
-if ($^O eq 'MacOS') {
-       $macfiles = eval { require Mac::Files };
-}
-
 sub case_tolerant { 1 }
 
 
@@ -343,27 +338,11 @@ sub devnull {
 
 =item rootdir
 
-Returns a string representing the root directory.  Under MacPerl,
-returns the name of the startup volume, since that's the closest in
-concept, although other volumes aren't rooted there. The name has a
-trailing ":", because that's the correct specification for a volume
-name on Mac OS.
-
-If Mac::Files could not be loaded, the empty string is returned.
+Returns the empty string.  Mac OS has no real root directory.
 
 =cut
 
-sub rootdir {
-#
-#  There's no real root directory on Mac OS. The name of the startup
-#  volume is returned, since that's the closest in concept.
-#
-    return '' unless $macfiles;
-    my $system = Mac::Files::FindFolder(&Mac::Files::kOnSystemDisk,
-       &Mac::Files::kSystemFolderType);
-    $system =~ s/:.*\Z(?!\n)/:/s;
-    return $system;
-}
+sub rootdir { '' }
 
 =item tmpdir