laziness, impatience, and hubris | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I'm not completely happy with most documentation I see on "compile time" and "run time". They mostly encourage or at least don't discourage the impression that there is one time called "compile time" when your script is compiled and then there is one "run time". In reality, each statement has its own "compile time" and any number of "run time"s. I find it clearer and more accurate to think about more detailed steps that perl goes through, in order.
So, if I use require in my main script, then there can be whole files of Perl code that don't get compiled until after my main script has finished being compiled and has started running (and the require statement might not even get run). Conversely, if I use that same require statement inside of a module that my main script uses, then those files will be compiled and their non-subroutine statements run before most of my main script is even compiled. Update: s/of/off/. Thanks, gam3. - tye In reply to Re: RunTime & compile Time Doubt on Perl (many)
by tye
|
|