This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
fix do dir returning no $!
authorDaniel Dragan <bulk88@hotmail.com>
Sun, 16 Aug 2015 08:30:23 +0000 (04:30 -0400)
committerZefram <zefram@fysh.org>
Sun, 12 Nov 2017 02:05:10 +0000 (02:05 +0000)
commitd1ac83c4011b4bf51ca3fb070737a97a6c6ac545
treedea46ad1fb806ccb24cf176b56ff606f372cc70a
parent69374fe705978962b85217f3eb828a93f836fd8d
fix do dir returning no $!

do()ing a directory was returning false/empty string in $!, which isn't
an error, yet documentation says $! should have the error code in it.
Fix this by returning EISDIR for dirs, and EINVAL for block devices.
[perl #125774]

Remove "errno = 0" and comment added in b2da7ead68, since now there is no
scenario where errno is uninitialized, since the dir and block device
failure branches now set errno, where previously they didn't.
pod/perldelta.pod
pp_ctl.c
t/op/do.t