Beefy Boxes and Bandwidth Generously Provided by pair Networks RobOMonk
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: Why no bareword warnings while inside of BEGIN (more)

by TimToady (Parson)
on Mar 23, 2004 at 01:14 UTC ( #338862=note: print w/ replies, xml ) Need Help??


in reply to Re: Why no bareword warnings while inside of BEGIN (more)
in thread Why no bareword warnings while inside of BEGIN

The code to execute BEGIN immediately doesn't properly check the compilation error flag before executing the block. Here's a patch against 5.8.3:

--- op.c.orig 2004-03-22 16:59:09.000000000 -0800 +++ op.c 2004-03-22 16:59:25.000000000 -0800 @@ -4359,7 +4359,7 @@ if (*s != 'B' && *s != 'E' && *s != 'C' && *s != 'I') goto done; - if (strEQ(s, "BEGIN")) { + if (strEQ(s, "BEGIN") && !PL_error_count) { I32 oldscope = PL_scopestack_ix; ENTER; SAVECOPFILE(&PL_compiling);
It already appears to be fixed in 5.9.1.


Comment on Re: Re: Why no bareword warnings while inside of BEGIN (more)
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://338862]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2014-04-23 19:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (553 votes), past polls