New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix for RT#113422 is buggy and needs to be fixed for inaccesible directories (like PERL5LIB) #14177
Comments
From burak@cpan.orgCreated by burak@cpan.orgI'm copying the original report from Luciano Rocha in RT#113422 " The description didn't help finding the reason of the error: -sh-4.1$ /usr/local/booking-perl/5.18.2/bin/perl5.18.2 -e 'use warnings; print "@INC\n"' -sh-4.1$ ls -l /usr/local/booking-perl/5.18.2/lib/warnings.pm The problem was having a directory in PERL5LIB that had the wrong permissions. Test case: So perl isn't distinguishing from "no permission to read file" and "no permission to access a component in @INC". Could the fix be changed to only report on file permissions, or make the error more informative (include the path that gave the error, not just the module name)? Regards. Note that the fix done in RT#113422 will also trigger that fatal error even with a simple version check: ml97053:~ bgursoy$ mkdir /tmp/test && sudo chmod 0600 /tmp/test && sudo chown root /tmp/test This error is cryptic, misleading and not helpful. The directory checks should only emit a warning and fall back to the regular program flow. Also note that such a directory can also be empty Perl Info
|
From @ap* via RT <perlbug-followup@perl.org> [2014-10-24 15:25]:
Because it can’t. Perl never tries to access parts of the path, it just Therefore:
– No, it can’t. You might imagine that perl should walk the path itself in order to
– Yes! And it clearly ought to.
There *are* *no* directory checks. Not in perl anyway. The directory So the best perl can do – and it ought to do that – is report the full
That’s completely irrelevant: neither does it make any difference, nor Regards, |
The RT System itself - Status changed from 'new' to 'open' |
From @cpansproutOn Fri Oct 24 22:20:06 2014, aristotle wrote:
Any suggestions for the wording would be much appreciated. -- Father Chrysostomos |
From @ap* Father Chrysostomos via RT <perlbug-followup@perl.org> [2014-10-25 22:40]:
I’m considering something like the following: perl -e 'BEGIN { splice @INC,2,0,"/root" } use warnings' For comparison, the current error is Can't locate warnings.pm: Permission denied at -e line 1. I’d say the ideal error would be something like Locating warnings.pm failed at $INC[2] (/root): Permission denied at -e line 1. Unfortunately there seems to be quite a bit of code on CPAN matching on Can't locate warnings.pm: failed at $INC[2] (/root): Permission denied at -e line 1. Do those help? |
From @cpansproutOn Sun Oct 26 11:08:34 2014, aristotle wrote:
Petr Písař beat me in writing a patch, which I applied as e2ce095. I think his shorter version is just as clear. -- Father Chrysostomos |
@cpansprout - Status changed from 'open' to 'pending release' |
From @khwilliamsonThanks for submitting this ticket The issue should be resolved with the release today of Perl v5.22. If you find that the problem persists, feel free to reopen this ticket -- |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#123042 (status was 'resolved')
Searchable as RT123042$
The text was updated successfully, but these errors were encountered: