Just another Perl shrine | |
PerlMonks |
Re: One Big Script v. Several Small Scriptsby Gilimanjaro (Hermit) |
on Jan 28, 2003 at 23:02 UTC ( [id://230798]=note: print w/replies, xml ) | Need Help?? |
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...
In Section
Seekers of Perl Wisdom
|
|