Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re: One Big Script v. Several Small Scripts

by Gilimanjaro (Hermit)
on Jan 28, 2003 at 23:02 UTC ( [id://230798]=note: print w/replies, xml ) Need Help??


in reply to One Big Script v. Several Small Scripts

I just rebuilt a big script into a few small ones; there's only one CGI that's the entrance, and all 'parts' reside in sub's in separate modules, which export the sub.

I'm currently using the 'autoload' pragma module to only load the module that's going to be used when the function gets called...

I'm aware there's a whole bunch of other modules that can do comparable dynamic loading, but this one works for me... :)

Addition: One that seems to be appropriate for this task is also SelfLoader which allows you to keep the code in one file, but not compile it all. In fact just adding 2 lines to working code can avoid compiling more code then you need...

  • Comment on Re: One Big Script v. Several Small Scripts

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others chilling in the Monastery: (3)
As of 2024-04-25 17:21 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found