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
5.13.1+ exception localisation hides $@ from destructors #10479
Comments
From @ribasushiCreated by ribasushi@cpan.org5.13.1 introduced an improved way of $@ handling, by delaying the An example of affected code is DBIx::Class::Storage::TxnScopeGuard [1] http://perl5.git.perl.org/perl.git/commitdiff/9d5401cef7488142a773a2e8980f9763da4a2cae?hp=9e5bbba0de25c01ae9355c7a97e237602a37e9f3 Perl Info
|
From zefram@fysh.orgPeter Rabbitson wrote:
To achieve what you want from this was already impossible. You could see TxnScopeGuard is essentially doing this: $ perl5.10.0 -le 'sub DESTROY { print "in DESTROY: \$\@=\"$@\""; } eval { my $guard = bless({}); 1; };' But it already loses in this situation: $ perl5.10.0 -le 'sub DESTROY { print "in DESTROY: \$\@=\"$@\""; } eval { my $guard = bless({}); eval { die "bar"; }; 1; };' It now loses in more situations: $ bleadperl -le 'sub DESTROY { print "in DESTROY: \$\@=\"$@\""; } eval { my $guard = bless({}); 1; };'
You already have the correct logic for deciding to roll back: you roll -zefram |
The RT System itself - Status changed from 'new' to 'open' |
From @ribasushiOn Fri Jul 09 02:48:33 2010, zefram@fysh.org wrote:
When you say "unwinding" - do you mean out-of-order exit() destruction?
This particular situation is a user error - he did not Try::Tiny or
The whole point of the guard *is* the warning. The rollback will happen In essence we will have to deprecate this module asap if it is certain Note - we care *whether* the DESTROY is a result of an exception, not |
From @ribasushiStalling pending investigation of how to work around this without |
@rgs - Status changed from 'open' to 'rejected' |
From @ribasushiGreetings everyone, I would like to rehash the consequences of commit 96d9b9c made back on I will try to briefly summarize the "what's so special" part below, So the TLDR version is: If you have a guard object whose DESTROY has I am all for the actual change (it's now impossible to clobber $@ Cheers |
1 similar comment
From @ribasushiGreetings everyone, I would like to rehash the consequences of commit 96d9b9c made back on I will try to briefly summarize the "what's so special" part below, So the TLDR version is: If you have a guard object whose DESTROY has I am all for the actual change (it's now impossible to clobber $@ Cheers |
From @ribasushiSo about a year has passed, and I'd like to rehash this RT once again. I http://www.perlmonks.org/?node_id=924524 Cheers |
Migrated from rt.perl.org#76426 (status was 'rejected')
Searchable as RT76426$
The text was updated successfully, but these errors were encountered: