This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Report inaccesible file on failed require
authorPetr Písař <ppisar@redhat.com>
Fri, 21 Nov 2014 09:48:51 +0000 (10:48 +0100)
committerFather Chrysostomos <sprout@cpan.org>
Fri, 21 Nov 2014 16:17:57 +0000 (08:17 -0800)
commite2ce0950e5e4b86c6fcbc488c37dd61d082b3e0d
treec926e62a2854ab1af70b90961e7ba7641634ba1b
parent806047e5a77079b7627be53718dce0e7d4f024ba
Report inaccesible file on failed require

Commit 2433d39e6 (require should die if a file exists but can't be
read) made first failed opened file fatal as request in
[perl #113422]. However error message produced in that case is not
much helpful in identifying which file ound not been accessed:

    $ LANG=C perl -I/root -e 'require strict'
    Can't locate strict.pm:   Permission denied at -e line 1.

This patch adds the name of the failed file to the message to help
identify which @INC directory is erroneous:

    $ LANG=C ./perl -I/root -I./lib -e 'require strict'
    Can't locate strict.pm:   /root/strict.pm: Permission denied at -e line 1.

Signed-off-by: Petr Písař <ppisar@redhat.com>
pp_ctl.c