You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
==================
root@felipe 14:08:36 case88745 /usr/local/cpanel
> perl -e'open FH, "<", "yglzdfvxbfg" or die;'
Died at -e line 1.
ENOENT (2)
==================
root@felipe 14:06:08 case88745 /usr/local/cpanel
> 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.
On 2014-03-10 20:12, [email protected] via RT wrote:
> Mon Mar 10 15:12:14 2014: Request 93716 was acted upon.
> Transaction: Ticket created by [email protected]
> Queue: autodie
> Subject: autodie should exit($!)
> Broken in: (no value)
> Severity: (no value)
> Owner: Nobody
> Requestors: [email protected]
> 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
On 10.3.14, 2:22 PM, Niels Thykier via RT wrote:
> <URL: https://rt.cpan.org/Ticket/Display.html?id=93716 >
>
> On 2014-03-10 20:12, [email protected] via RT wrote:
>> Mon Mar 10 15:12:14 2014: Request 93716 was acted upon.
>> Transaction: Ticket created by [email protected]
>> Queue: autodie
>> Subject: autodie should exit($!)
>> Broken in: (no value)
>> Severity: (no value)
>> Owner: Nobody
>> Requestors: [email protected]
>> 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 /
> perl -Mautodie -e'print $autodie::VERSION'
2.22
OK
felipe@Macintosh-19 14:26:53 /
> 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
Current Behavior:
$>perl -Ilib -Mautodie -e'open FH, "<", "qweqweqerwr"; print "Should not reach here\n"'; echo $?
Can't open 'qweqweqerwr' for reading: 'No such file or directory' at -e line 1
255
Felipe believes it should ext 2: "Normally Perl uses $! as the exit value when an exception ends the program."
#> perl -e'open FH, "<", "qweqweqerwr" or die'; echo $?
Died at -e line 1.
2
The text was updated successfully, but these errors were encountered:
Migrated from rt.cpan.org#93716 (status was 'open')
Requestors:
From [email protected] on 2014-03-10 19:12:14
:
From [email protected] on 2014-03-10 19:22:20
:
From [email protected] on 2014-03-10 19:30:46
:
From [email protected] on 2020-01-08 15:48:53
:
The text was updated successfully, but these errors were encountered: