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