Skip Menu |
 

This queue is for tickets about the autodie CPAN distribution.

Report information
The Basics
Id: 93716
Status: open
Priority: 0/
Queue: autodie

People
Owner: Nobody in particular
Requestors: felipe [...] felipegasper.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: autodie should exit($!)
Date: Mon, 10 Mar 2014 14:12:02 -0500
To: bug-autodie [...] rt.cpan.org
From: Felipe Gasper <felipe [...] felipegasper.com>
Download (untitled) / with headers
text/plain 633b
================== root@felipe 14:08:36 case88745 /usr/local/cpanel Show quoted text
> perl -e'open FH, "<", "yglzdfvxbfg" or die;'
Died at -e line 1. ENOENT (2) ================== root@felipe 14:06:08 case88745 /usr/local/cpanel Show quoted text
> cat | perl -Mautodie
`perl -Mautodie -e'open FH, "<", "yglzdfvxbfg"'`; print 0+$? . $/; print $? . $/; Can't open 'yglzdfvxbfg' for reading: 'No such file or directory' at -e line 1 65280 65280 OK ================== When an exception from autodie causes perl to exit(), the exit code should correspond to the value of $! as perl “natively” does as in the first example above. -Felipe Gasper cPanel, Inc.
Subject: Re: [rt.cpan.org #93716] autodie should exit($!)
Date: Mon, 10 Mar 2014 20:22:06 +0100
To: bug-autodie [...] rt.cpan.org
From: Niels Thykier <niels [...] thykier.net>
Download (untitled) / with headers
text/plain 1.1k
On 2014-03-10 20:12, felipe@felipegasper.com via RT wrote: Show quoted text
> Mon Mar 10 15:12:14 2014: Request 93716 was acted upon. > Transaction: Ticket created by felipe@felipegasper.com > Queue: autodie > Subject: autodie should exit($!) > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: felipe@felipegasper.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93716 > > > > [...] > > When an exception from autodie causes perl to exit(), the exit code > should correspond to the value of $! as perl “natively” does as in the > first example above. > > > -Felipe Gasper > cPanel, Inc. >
Hi Felipe, What version of autodie are you using? Namely, I suspect that the problem would be fixed in autodie 2.21 due to: """ * INTERNAL : $" and $! are no longer arbitrarily messed with for no reason via autodie. (They're still messed with when using Fatal.) """ Which would ensure that "$!" is (still) set to 2 and die should DTRT from there. Previously, $! would be "protected" by a local, causing it to be reset to (in your example above) 0. ~Niels
Subject: Re: [rt.cpan.org #93716] autodie should exit($!)
Date: Mon, 10 Mar 2014 14:30:33 -0500
To: bug-autodie [...] rt.cpan.org
From: Felipe Gasper <felipe [...] felipegasper.com>
Download (untitled) / with headers
text/plain 1.7k
On 10.3.14, 2:22 PM, Niels Thykier via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=93716 > > > On 2014-03-10 20:12, felipe@felipegasper.com via RT wrote:
>> Mon Mar 10 15:12:14 2014: Request 93716 was acted upon. >> Transaction: Ticket created by felipe@felipegasper.com >> Queue: autodie >> Subject: autodie should exit($!) >> Broken in: (no value) >> Severity: (no value) >> Owner: Nobody >> Requestors: felipe@felipegasper.com >> Status: new >> Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=93716 > >> >> >> [...] >> >> When an exception from autodie causes perl to exit(), the exit code >> should correspond to the value of $! as perl “natively” does as in the >> first example above. >> >> >> -Felipe Gasper >> cPanel, Inc. >>
> > Hi Felipe, > > What version of autodie are you using? Namely, I suspect that the > problem would be fixed in autodie 2.21 due to: > > """ > * INTERNAL : $" and $! are no longer arbitrarily messed with > for no reason via autodie. (They're still messed with when > using Fatal.) > """ > > Which would ensure that "$!" is (still) set to 2 and die should DTRT > from there. Previously, $! would be "protected" by a local, causing it > to be reset to (in your example above) 0. >
Hm. I was using 2.12. That sounds like it would fix the issue, but I tried updating my laptop’s autodie version to 2.22, to no avail: felipe@Macintosh-19 14:25:15 / Show quoted text
> perl -Mautodie -e'print $autodie::VERSION'
2.22 OK felipe@Macintosh-19 14:26:53 / Show quoted text
> cat | perl -Mautodie
`perl -Mautodie -e'open FH, "<", "yglzdfvxbfg"'`; print ($? >> 8) . $/; Can't open 'yglzdfvxbfg' for reading: 'No such file or directory' at -e line 1 255 -F


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.