Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

Re: use and performance

by perrin (Chancellor)
on Jun 10, 2003 at 14:55 UTC ( [id://264697]=note: print w/replies, xml ) Need Help??


in reply to use and performance

The best practice is to use all the modules you need in every module that needs them. There is no speed issue (perl only loads them the first time) and it serves as useful documentation.

Replies are listed 'Best First'.
Re: Re: use and performance
by educated_foo (Vicar) on Jun 10, 2003 at 15:25 UTC
    This isn't entirely true, since all those imports can really kill your script's startup time. If startup time's an issue, you should "use" modules only once, and just "require" them everywhere else. Equally good documentation, but less pain.

    /s

      I shudder to think how many imports it would take to make a dent in the startup time of a script on a modern computer. Most imports don't do anything at all.
        Class::Struct is an example of something that does a lot of work on import. This bites the prototype perl6 compiler pretty hard.

        /s

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (2)
As of 2024-04-25 20:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found