develooper Front page | perl.perl5.porters | Postings from July 2019

[perl #134177] Argument croak_on_error for eval_pv() is broken

Thread Previous
From:
Tony Cook via RT
Date:
July 8, 2019 01:57
Subject:
[perl #134177] Argument croak_on_error for eval_pv() is broken
Message ID:
rt-4.0.24-4032-1562551032-171.134177-15-0@perl.org
On Thu, 04 Jul 2019 03:11:45 -0700, pali@cpan.org wrote:
> On Wednesday 19 June 2019 22:31:43 Tony Cook via RT wrote:
> > On Mon, 17 Jun 2019 01:06:58 -0700, pali@cpan.org wrote:
> > > On Sunday 16 June 2019 21:40:43 Tony Cook via RT wrote:
> > > > On Fri, 14 Jun 2019 00:44:07 -0700, pali@cpan.org wrote:
> > > > > What about checking for SvROK? Or installing __DIE__ handler and
> > > > > checking if __DIE__ handler was called?
> > > >
> > > > When I suggested using ROK in #p5p you brought up clobbering $@ as a
> > > > problem, but I don't think it is one - eval in all its forms clobbers
> > > > $@ and I don't think it's unreasonable to expect that from
> > > > eval_pv()/eval_sv() (and eval_sv() can G_KEEPERR).
> > > >
> > > > Using a __DIE__ handler would be unnecessarily complex - you'd be
> > > > better off modifying eval_sv()[1] to accept a G_RETHROW flag, which
> > > > wouldn't be too hard.
> > > 
> > > Seems like introduction of G_RETHROW in eval_sv() is the best way.
> > 
> > See the attached.
> 
> Hi! Have you applied this G_RETHROW patch?

Done in fb81daf0179f156be3f2a95cd5cf1d27e9f7ebbb, 66ff4fb5827047a9962893be6bdf6c6439b7af2c.

Thanks for your feedback.

Tony


---
via perlbug:  queue: perl5 status: open
https://rt.perl.org/Ticket/Display.html?id=134177

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About