-
Notifications
You must be signed in to change notification settings - Fork 560
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eval {} still clobbers $@ in a DESTROY #14473
Comments
From @FGasperCreated by @FGasper#!/usr/bin/env perl package Destroyer; sub new { bless {} } sub DESTROY { eval {} } package main; eval {
|
From zefram@fysh.orgfelipe@felipegasper.com wrote:
Interesting. This is specific to the "for(Destroyer->new)" formulation; It is presumably a matter of order of destruction. The output suggests -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From @ap* Zefram <zefram@fysh.org> [2015-02-05 12:45]:
With #!/usr/bin/env perl I get this output: $ perl t.pl Note how the `warn` around the `eval` actually picks up the inside exception. You can change this to the statement modifier form of `for` and you can change So I would guess the bug is due to `foreach` aliasing – specifically that the This readily suggests a workaround for running under existing perls: if you eval { ... }, my and then add a line warn 'from same statement: ', $e; then this extra line appears in the output: from same statement: haha at t.pl line 8. So something like Try::Tiny can work around this issue already, at least. Regards, |
From @ap* Aristotle Pagaltzis <pagaltzis@gmx.de> [2015-02-06 11:00]:
OTOH – a `warn $_` during the same statement doesn’t see the Destroyer -- |
From @iabynOn Wed, Feb 04, 2015 at 09:51:23PM -0800, felipe@felipegasper.com wrote:
Now fixed v5.27.0-119-gb66d79a -- |
@iabyn - Status changed from 'open' to 'pending release' |
From @khwilliamsonThank you for filing this report. You have helped make Perl better. With the release yesterday of Perl 5.28.0, this and 185 other issues have been Perl 5.28.0 may be downloaded via: If you find that the problem persists, feel free to reopen this ticket. |
@khwilliamson - Status changed from 'pending release' to 'resolved' |
Migrated from rt.perl.org#123738 (status was 'resolved')
Searchable as RT123738$
The text was updated successfully, but these errors were encountered: