develooper Front page | perl.perl5.porters | Postings from February 2016

[perl #127386] Setting $! during DESTROY clobbers exit value

Thread Previous
From:
Tony Cook via RT
Date:
February 23, 2016 04:37
Subject:
[perl #127386] Setting $! during DESTROY clobbers exit value
Message ID:
rt-4.0.18-1975-1456202239-1304.127386-15-0@perl.org
On Mon Feb 08 15:22:16 2016, felipe@felipegasper.com wrote:
> Perhaps, then, modify the paragraph that begins the section to:
> 
> -If an uncaught exception results in interpreter exit, the exit
> -code is determined from the values of $! and $? with this
> -pseudocode:
> 
> +If L</die> is called when there is no L</eval> in the call stack,
> +Perl sets C<$?> as per the following pseudocode:
> 
> Anyhow, if $? will continue to be set before propagation rather than 
> after, then this is kind of splitting hairs. I definitely appreciate 
> Tony’s proposed change.

I thought about that, and tried a few variations on the text, but didn't
come up with any changes I liked.

I've applied my most recent patch with a change from a comma to a semi-colon as 88aeef83d79fbcd4dab43cc58155923e65a6d82e.

Tony

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

Thread Previous


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