Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Use and Require - making an informed choice.

by Anonymous Monk
on Jan 30, 2006 at 15:00 UTC ( [id://526460]=note: print w/replies, xml ) Need Help??


in reply to Use and Require - making an informed choice.

Does the module need to be imported at compile time (i.e. does it rely on using BEGIN)?
Remove "(i.e. does it rely on using BEGIN)" as it isn't a factor.
  • Comment on Re: Use and Require - making an informed choice.

Replies are listed 'Best First'.
Re^2: Use and Require - making an informed choice.
by xdg (Monsignor) on Jan 30, 2006 at 15:33 UTC

    The fact that a use creates a BEGIN block can matter if order of compilation is important. That's substantially different from a runtime require and import without the BEGIN. For example: importing a function that overrides a built-in. If requiring and installing a subroutine at runtime, the compiler will already have resolved calls to the built-in functions at compile time before the replacement functions are installed.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (6)
As of 2024-04-16 17:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found