develooper Front page | perl.perl5.porters | Postings from June 2013

[perl #85976] The 'do' function does not clear $! if it fails to compile it's argument

Thread Previous | Thread Next
From:
James E Keenan via RT
Date:
June 18, 2013 00:35
Subject:
[perl #85976] The 'do' function does not clear $! if it fails to compile it's argument
Message ID:
rt-3.6.HEAD-2552-1371515740-932.85976-15-0@perl.org
The last two posts in this RT were from xdaveg (replying to pjcj) and
from doy:

#####
On Sat Mar 19 18:04:55 2011, xdaveg@gmail.com wrote:
> On Sat, Mar 19, 2011 at 12:28 PM, Paul Johnson <paul@pjcj.net> wrote:
> > This general topic has been discussed before. I believe the consensus
> > is (or perhaps it's just my opinion) that:
> >
> > 1. As you note, this isn't actually a bug. As documented in perlvar,
> >  and analogously to errno, $! only has meaning immediately after an
> >  error has occurred in a system or library call.
> >
> > 2. It is not always obvious when a library call occurs, nor what
> >  "immediately" means in this context. Ideally, a Perl programmer
> >  would be shielded from these details anyway.
> >
> > 3. Patches to improve the situation would probably be accepted provided
> >  any detrimental effect was manageable (performance,
> > maintainability,
> >  clarity of documentation etc.).
> >
> > 4. This is probably not very far up the TODO list of anyone who is
> >  regularly patching perl.
> 
> After Zbigniew uncovered this through CPAN Testers, I asked Zbigniew
> to submit this so it wouldn't get lost.
> 
> As we're right up to the 5.14 freeze, I'll commit a documentation
> clarification and maybe someone will tackle it eventually.  Certainly,
> as written, the docs are misleading.
> 
> -- David
> 

#####

On Tue Jul 03 17:38:20 2012, doy wrote:
> The documentation currently states:
> 
>   Always check $@ first, as compilation could fail in a way that also
> sets $!.
> 
> Is this sufficient? I don't think we really want to be messing with the
> semantics of $! in just this specific case.
> 
> -doy

#####

David,

Did you ever submit the documentation patch mentioned above?  If not, is
it still worth pursuing, given the point made by doy?

Let's see if we can push this ticket toward resolution.

Thank you very much.
Jim Keenan


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org:443/rt3/Ticket/Display.html?id=85976

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About