Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Re: Why no bareword warnings while inside of BEGIN

by Juerd (Abbot)
on Mar 22, 2004 at 22:44 UTC ( #338805=note: print w/ replies, xml ) Need Help??


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

A BEGIN block is not marked by the sub keyword. Instead, you just use BEGIN {...}

It can be, though. "sub BEGIN" doesn't create a normal sub called BEGIN, but it is valid syntax. In fact, it is how B::Deparse deparses BEGIN blocks. The same goes for CHECK, INIT and END. See also what perlmod has to say about this.

Juerd # { site => 'juerd.nl', plp_site => 'plp.juerd.nl', do_not_use => 'spamtrap' }


Comment on Re: Re: Why no bareword warnings while inside of BEGIN

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2015-07-05 02:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (60 votes), past polls