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

Re: [perl #24684] Too late warning not given for CHECK block in INIT block

Thread Next
Yitzchak Scott-Thoennes
January 10, 2012 15:35
Re: [perl #24684] Too late warning not given for CHECK block in INIT block
Message ID:
On Tue, Jan 10, 2012 at 1:58 PM, Father Chrysostomos wrote:
> On Sat Dec 17 23:17:09 2011, sprout wrote:
>> On Sat Dec 17 20:36:28 2011, alh wrote:
>> > This is because when nothing is actually happening in the main scope of
>> > the program it's treated as an OP_STUB which causes Perl_newPROG() to
>> > skip out before setting PL_main_start; which is what the warning
> requires:
>> > Since the CHECK blocks don't actually get run, the warning should still
>> > get generated. Does PL_main_start (and PL_main_root, etc..) need to get
>> > set even when it's just an OP_STUB?  Or is this an unlikely / illogical
>> > situation?
>> It may be very unlikely, but I would not consider it illogical to want
>> to eval a generated CHECK block.
> On the other hand, this bug report was about the main program, not an
> empty eval.  So I am apparently rather confused.

This bug is only about a very unlikely to occur case, so is presumably
very low priority.  On the other hand, given this bug, there may be
other undesirable consequences of not having PL_main_start set for an
empty main program.  On the gripping hand, fixing that will require
significant diligence to see that no bugs are introduced.

Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About