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

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

Thread Next
From:
pali
Date:
July 4, 2019 10:11
Subject:
Re: [perl #134177] Argument croak_on_error for eval_pv() is broken
Message ID:
20190704101121.cfi4t4hj2hicex5c@pali
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?

Thread Next


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