summaryrefslogtreecommitdiff
path: root/dist/PathTools/lib/File/Spec/Mac.pm
diff options
context:
space:
mode:
authorZefram <zefram@fysh.org>2017-12-24 11:09:54 +0000
committerZefram <zefram@fysh.org>2017-12-24 11:09:54 +0000
commitd2e38af7de734aa1e317de7166c6995e432e2f30 (patch)
tree8b86a58283f68240c1a396dc803ba2c8f466e11e /dist/PathTools/lib/File/Spec/Mac.pm
parente7e8ce8540f1612023d46e27e60ff002d8ab5dd7 (diff)
downloadperl-d2e38af7de734aa1e317de7166c6995e432e2f30.tar.gz
correct error returns from _perl_abs_path()
The perl implementation of abs_path(), and hence of getcwd(), was returning an empty string on error, and sending a diagnostic to stderr. The diagnostic for failing to find a directory in its parent included a bogus $! value. This differed from the XS version, which returns undef with $! set appropriately. The documentation, not explicit on the topic, suggests that errors should be signalled more like what the XS was doing. Resolve the discrepancy by changing the perl implementation to signal errors by returning undef with $! set appropriately. Document getcwd() and abs_path() as doing this. Fixes [perl #132648].
Diffstat (limited to 'dist/PathTools/lib/File/Spec/Mac.pm')
-rw-r--r--dist/PathTools/lib/File/Spec/Mac.pm2
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/PathTools/lib/File/Spec/Mac.pm b/dist/PathTools/lib/File/Spec/Mac.pm
index ed30f1aa85..105c2b7708 100644
--- a/dist/PathTools/lib/File/Spec/Mac.pm
+++ b/dist/PathTools/lib/File/Spec/Mac.pm
@@ -4,7 +4,7 @@ use strict;
use Cwd ();
require File::Spec::Unix;
-our $VERSION = '3.71';
+our $VERSION = '3.72';
$VERSION =~ tr/_//d;
our @ISA = qw(File::Spec::Unix);