in reply to Re: What is the scope of BEGIN? Or... when does it "begin?"
in thread What is the scope of BEGIN? Or... when does it "begin?"

Let me add that the reason why use is executed as if in a BEGIN block, thus before the rest of the script is compiled, is because what the module does may change the meaning of the rest of the program. Think of pragmas, like strict and integer, or think of constant, where the meaning of a bareword in your source changes, because it was defined as a subroutine in the module. The same thing easily happens in modules you wrote yourself, hence defining a subroutine in your module alleviates the need to use parens in your scripts.
  • Comment on Re^2: What is the scope of BEGIN? Or... when does it "begin?"