Skip to content
Commit a7550ec9 authored by Petr Písař's avatar Petr Písař Committed by Dominic Hargreaves
Browse files

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: default avatarPetr Písař <ppisar@redhat.com>

Bug: https://rt.perl.org/Public/Bug/Display.html?id=123270
Bug-Debian: http://bugs.debian.org/781120
Patch-Name: fixes/failed_require_diagnostics.diff
parent f3dc1890
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment