Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re: RunTime & compile Time Doubt on Perl

by GrandFather (Saint)
on Sep 03, 2006 at 06:05 UTC ( [id://570911]=note: print w/replies, xml ) Need Help??


in reply to RunTime & compile Time Doubt on Perl

The Perl "interpreter" "compiles" your Perl script before "running" it. This happens in a number of phases with stuff in BEGIN blocks being processed first, INIT block code is processed following compilation, then the main code is executed then, at exit time, the stuff in END blocks. require statements are processed at run time, but use statements are processed before any other main code statements.

Note that the location of a use statement doesn't alter when it is processed, only their order in the file affects the order that use statements are processed. In particular, you can not prevent a use statement from being processed by putting it inside an if, it is processed regardless.


DWIM is Perl's answer to Gödel
  • Comment on Re: RunTime & compile Time Doubt on Perl

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (4)
As of 2024-04-26 06:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found