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
The 'do' function does not clear $! if it fails to compile it's argument #11190
Comments
From zby@cpan.orgCreated by zby@cpan.orgRunning this code: do 'example.pl' or print "\$!: $!\n"; assumming that 'example.pl' in current directory contains: use NonExisting; Results in: $!: No such file or directory I.e. both "$!" and "$@" are set. The documentation of 'do' says: If "do" cannot read the file, it returns undef and sets $! to This does not, strictly speaking, preclude the current behaviour, The current behavious is probably a result of not clearing $!, set Perl Info
|
From @pjcjOn Sat, Mar 12, 2011 at 01:48:12AM -0800, Zbigniew Lukasiak wrote:
Unless they were familiar with errno, I suspect.
This general topic has been discussed before. I believe the consensus 1. As you note, this isn't actually a bug. As documented in perlvar, 2. It is not always obvious when a library call occurs, nor what 3. Patches to improve the situation would probably be accepted provided 4. This is probably not very far up the TODO list of anyone who is -- |
The RT System itself - Status changed from 'new' to 'open' |
From @xdgOn Sat, Mar 19, 2011 at 12:28 PM, Paul Johnson <paul@pjcj.net> wrote:
After Zbigniew uncovered this through CPAN Testers, I asked Zbigniew As we're right up to the 5.14 freeze, I'll commit a documentation -- David |
From @doyThe documentation currently states: Always check $@ first, as compilation could fail in a way that also Is this sufficient? I don't think we really want to be messing with the -doy |
From @jkeenanThe last two posts in this RT were from xdaveg (replying to pjcj) and #####
##### On Tue Jul 03 17:38:20 2012, doy wrote:
##### David, Did you ever submit the documentation patch mentioned above? If not, is Let's see if we can push this ticket toward resolution. Thank you very much. |
From @xdgOn Mon, Jun 17, 2013 at 8:35 PM, James E Keenan via RT
Yes, the doc patch went in. I care less about whether $! is cleared than that having to check two No one has volunteered to do that work. I have no problem with the ticket remaining open at low priority. -- |
Migrated from rt.perl.org#85976 (status was 'open')
Searchable as RT85976$
The text was updated successfully, but these errors were encountered: