Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: require() on the fly

by BooK (Curate)
on Jan 16, 2001 at 05:10 UTC ( #52125=note: print w/ replies, xml ) Need Help??


in reply to Re: require() on the fly
in thread require() on the fly

In fact since This.pm (and That.pm) will only hold subroutine definitions, it won't be a package (no package This; at the beginning)... So I don't think I'll even need to use import or @EXPORT...

It's really meant to be a convenient (and efficient) way to parse only the necessary subroutine code in order to speed up the script a bit. My question was more like: "Is it really worth it?"


Comment on Re: Re: require() on the fly
Re: Re: Re: require() on the fly
by AgentM (Curate) on Jan 16, 2001 at 05:18 UTC
    require reads and does preliminary parsing on the file. Saving one on a larger file will certainly save you time though probably not much if you're just loading a few functions. If you want to work on encapsualtion and efficiency, a package setup would work well. "Is it really worth it?" Probably not. But definitely give CGI::Lite a whorl.
    AgentM Systems nor Nasca Enterprises nor Bone::Easy nor Macperl is responsible for the comments made by AgentM. Remember, you can build any logical system with NOR.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2015-07-02 00:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (25 votes), past polls