There is a lot wrong with the approach. Your using modules and your complaining that they don't require the functions they use 'enough.' If they didn't require them at all, then the module shouldn't be including them. If they require them and they aren't practical then your problem lies with the module's author.
The second problem is: "There is no obvious win by having everything loaded up front." Which would imply a lack of education. Substituting nice compile time errors for a greater risk of run time errors is never a good thing. That isn't the only advantage, compile-time can take its time, run time is supposed to be the fast. The alternative, is wait while running, rather than waiting to compile.
Require is out of style for a reason, leave it that way. I wouldn't bother hacking modules apart to save compile time, I would take the suggestion of moving to modperl, or mason. Very easy to set up, and then you can compile once, and execute over and over again.
Evan Carroll
www.evancarroll.com
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.