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

Re: [perl #76550] Differing string table cleanup with/without require

Thread Previous | Thread Next
From:
Dave Mitchell
Date:
April 18, 2012 08:51
Subject:
Re: [perl #76550] Differing string table cleanup with/without require
Message ID:
20120418155105.GG3117@iabyn.com
On Tue, Apr 17, 2012 at 10:28:30AM -0700, Father Chrysostomos via RT wrote:
> On Sat Jul 17 11:00:16 2010, nicholas wrote:
> > This is a bug report for perl from nick@ccl4.org,
> > generated with the help of perlbug 1.39 running under perl 5.13.2.
> > 
> > -----------------------------------------------------------------
> > [Please describe your issue here]
> > 
> > I don't understand why running the script directly generates the
> > unbalanced string table warnings, whilst using require does not:
> > 
> > $ cat 49472.pl
> > use strict;
> > sub MODIFY_CODE_ATTRIBUTE{}
> > sub f:Blah {$nosuchvar}
> > $ PERL_DESTRUCT_LEVEL=2 LC_ALL=en_GB.UTF-8 PERL_UNICODE="" ./perl
> >    -Ilib 49472.pl
> > Global symbol "$nosuchvar" requires explicit package name at 49472.pl
> >    line 3.
> > BEGIN not safe after errors--compilation aborted at 49472.pl line 3.
> > Unbalanced string table refcount: (1) for "open>" at (null) line 3
> >    during global destruction.
> > Unbalanced string table refcount: (1) for "open<" at (null) line 3
> >    during global destruction.
> > $ PERL_DESTRUCT_LEVEL=2 LC_ALL=en_GB.UTF-8 PERL_UNICODE="" ./perl
> >    -Ilib -e 'require qq{49472.pl}'
> > Global symbol "$nosuchvar" requires explicit package name at 49472.pl
> >    line 3.
> > BEGIN not safe after errors--compilation aborted at 49472.pl line 3.
> > Compilation failed in require at -e line 1.
> > 
> > 
> > This means that OPs are being cleaned up better when compilation fails
> >    under
> > a require, than when compilations fails at the top level of the
> >    interpreter?
> 
> I can’t reproduce this in a recent blead.  But maybe I’m doing something
> wrong.

It appears to have been fixed sometime between 5.15.3 and 1.15.4.

-- 
"Strange women lying in ponds distributing swords is no basis for a system
of government. Supreme executive power derives from a mandate from the
masses, not from some farcical aquatic ceremony."
    -- Dennis, "Monty Python and the Holy Grail"

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