develooper Front page | perl.perl5.porters | Postings from November 2012

[perl #2754] [BUG] can't exit 0 from CHECK{}

Thread Previous | Thread Next
From:
Father Chrysostomos via RT
Date:
November 25, 2012 07:15
Subject:
[perl #2754] [BUG] can't exit 0 from CHECK{}
Message ID:
rt-3.6.HEAD-17500-1353856512-707.2754-15-0@perl.org
On Sun Nov 25 05:31:01 2012, alh wrote:
> On Fri May 04 12:15:22 2012, Hugmeir wrote:
> > > I appeal to greater powers for a "public API"-acceptable fix. :)
> > 
> > I reappeal to greater powers for a "public API"-acceptable fix. Would be
> > nice to get this bug closed once and for all!
> 
> Hmm, does this actually break the contract of the public API?
> 
> The docs that I've found don't specify any specific return values, they
> just show through example that:
> 
> (From perlembed.pod)
>      exitstatus = perl_parse(my_perl, NULL, 2, embedding, NULL);
>      PL_exit_flags |= PERL_EXIT_DESTRUCT_END;
>      if(!exitstatus) {
>         exitstatus = perl_run(my_perl);
> 
> So as long as perl_parse returns a false value when it succeeds, we
> should be good?

I think we need to rethink (carefully!) how perl handles this
internally.  That BEGIN{exit 0} exits the program and CHECK{exit 0} does
not seems like the implementation details leaking through.

-- 

Father Chrysostomos


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

Thread Previous | 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