This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
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].
13 files changed: