CARVIEW |
Select Language
HTTP/2 200
cache-control: max-age=43200
server: Combust/Plack (Perl)
vary: Accept-Encoding
content-encoding: gzip
content-length: 2882
content-type: text/html; charset=utf-8
last-modified: Sun, 12 Oct 2025 00:18:14 GMT
date: Sun, 12 Oct 2025 00:18:14 GMT
strict-transport-security: max-age=15768000
Re: my $@ - a proposal - nntp.perl.org
Front page | perl.perl5.porters |
Postings from June 2008
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About

Re: my $@ - a proposal
Thread Previous | Thread NextFrom:
Graham BarrDate:
June 27, 2008 12:58Subject:
Re: my $@ - a proposalMessage ID:
846130F6-B513-4CB7-97AD-D5D6A6435B01@pobox.comOn Jun 27, 2008, at 2:39 PM, Jan Dubois wrote: > On Fri, 27 Jun 2008, David Nicol wrote: >> On Fri, Jun 27, 2008 at 2:10 PM, Graham Barr <gbarr@pobox.com> wrote: >> >>> localizing it is not right, because you only want to restore it if >>> it is >>> cleared. If you localize and DESTROY dies, the $@ will get >>> restored and you >>> will never see. >> >> the draft patch doesn't really localize in the C<local> sense because >> it doesn't clear ERRSV, but merely takes a copy of it and the >> restores >> the value to ERRSV when ERRSV winds up false after the destructor >> runs. > > That's not really good enough though. You need to restore ERRSV > whenever > the initial substring of the saved ERRSV doesn't match the current > ERRSV > (making sure that only cleanup errors have been appended). You cannot do that. Where does it say that $@ is a string? If DESTROY returns and $@ is set, then it should be left. If $@ has been cleared then it needs to be restored to what it was before DESTROY was called. > Otherwise you still end up with the wrong value in $@ when DESTROY > (or any code called from it) uses an eval that catches a die(): > > sub foo::DESTROY { eval {require bar} } > eval { my $foo = bless [] => "foo"; die "I'm dead" }; > print "\$\@ is $@\n"; > > With your patch you at least end up with a TRUE value in $@, but the > actual content is still not what you would expect. What do you expect ? Graham.Thread Previous | Thread Next
- my $@ - a proposal by Yuval Kogman
- RE: my $@ - a proposal by Jan Dubois
- Re: my $@ - a proposal by David Nicol
- Re: my $@ - a proposal by Graham Barr
- Re: my $@ - a proposal by David Nicol
- Re: my $@ - a proposal by Mark Mielke
- RE: my $@ - a proposal by Jan Dubois
- Re: my $@ - a proposal by Graham Barr
- Re: my $@ - a proposal by Graham Barr
- RE: my $@ - a proposal by Jan Dubois
- Re: my $@ - a proposal by Ben Morrow
- Re: my $@ - a proposal by Graham Barr
- RE: my $@ - a proposal by Jan Dubois
- Re: my $@ - a proposal by David Nicol
- RE: my $@ - a proposal by Jan Dubois
- Re: my $@ - a proposal by David Nicol
- RE: my $@ - a proposal by Jan Dubois
- Re: my $@ - a proposal by David Golden
- Re: my $@ - a proposal by Johan Vromans
- Re: my $@ - a proposal by Mark Mielke
- Re: my $@ - a proposal by Rafael Garcia-Suarez
- Re: my $@ - a proposal by Mark Mielke
- Re: my $@ - a proposal by Ben Morrow
- Re: my $@ - a proposal by Elliot Shank
- Re: my $@ - a proposal by Abigail
- Re: my $@ - a proposal by Juerd Waalboer
- Re: my $@ - a proposal by David Golden
- Re: my $@ - a proposal by Yuval Kogman
- Re: my $@ - a proposal by David Golden
- Re: my $@ - a proposal by Graham Barr
- Re: my $@ - a proposal by Yuval Kogman
- Re: my $@ - a proposal by Graham Barr
- Re: my $@ - a proposal by Sam Vilain
- Re: my $@ - a proposal by David Nicol
- Re: my $@ - a proposal by David Golden
- Re: my $@ - a proposal by Graham Barr
- Re: my $@ - a proposal by David Nicol
- RE: my $@ - a proposal by Jan Dubois
- Re: my $@ - a proposal by Aristotle Pagaltzis
- Re: my $@ - a proposal by Mark Mielke
- Re: my $@ - a proposal by Raphael_Manfredi
- Re: my $@ - a proposal by Mark Mielke
- Re: my $@ - a proposal by Raphael_Manfredi
- Re: my $@ - a proposal by Abigail
- Re: my $@ - a proposal by Mark Mielke
- Re: my $@ - a proposal by David Golden
- Re: my $@ - a proposal by Raphael_Manfredi
- Re: my $@ - a proposal by Dr.Ruud
- Re: my $@ - a proposal by Yuval Kogman
- Re: my $@ - a proposal by Sam Vilain
- Re: my $@ - a proposal by Abigail
- Re: my $@ - a proposal by Yuval Kogman
- Re: my $@ - a proposal by Sean O'Rourke
- Re: my $@ - a proposal by Yuval Kogman
- Re: my $@ - a proposal by Steffen Mueller
- Re: my $@ - a proposal by Yuval Kogman
- Re: my $@ - a proposal by David Golden
- Re: my $@ - a proposal by Yuval Kogman
- Re: my $@ - a proposal by David Golden
- Re: my $@ - a proposal by Abigail
- Re: my $@ - a proposal by Aristotle Pagaltzis
- Re: my $@ - a proposal by Mark Mielke
- Re: my $@ - a proposal by Yuval Kogman
- Re: my $@ - a proposal by Dr.Ruud
- Re: my $@ - a proposal by Mark Mielke
- Re: my $@ - a proposal by Sam Vilain
- Re: my $@ - a proposal by David Cantrell
- Re: my $@ - a proposal by Sam Vilain
- Re: my $@ - a proposal by Moritz Lenz
- Re: my $@ - a proposal by Sam Vilain
- Re: my $@ - a proposal by Moritz Lenz
- Re: my $@ - a proposal by Sam Vilain
- Re: my $@ - a proposal by Moritz Lenz
- Re: my $@ - a proposal by Sam Vilain
- Re: my $@ - a proposal by Abigail
- Re: my $@ - a proposal by Mark Mielke
- Re: my $@ - a proposal by Aristotle Pagaltzis
- Re: my $@ - a proposal by David Nicol
- Re: my $@ - a proposal by Nicholas Clark
- Re: my $@ - a proposal by David Nicol
- RE: my $@ - a proposal by Jan Dubois
- Re: my $@ - a proposal by David Nicol
- Re: my $@ - a proposal by Reini Urban
- Re: my $@ - a proposal by Dr.Ruud
- Re: my $@ - a proposal by Sam Vilain
nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About