In the same situation a few years ago, we came up with the same idea and went with it. It has worked well for us.
benefits:
1. If I remember correctly, we saw noticeably lower memory usage and a just-barely quicker startup time.

2. Merging changes, patching old releases, and working together with a large team is much easier. Instead of constantly merging changes to the same large files, now we're typically each working on tiny files that don't affect one another.

3. Copying code from one script to another doesn't result in annoying errors when we forget to require the right lib files. We require one lib file with the AUTOLOAD and it takes care of the rest, including nice error reporting and logging when something goes wrong (sub not found, sub doesn't compile, etc.).

I've really grown to like our current system, more because of #2 and #3 than #1.

drawbacks:
Once in a while you're going to run into wierd things caused by the autoload. I think we had a problem with sort subs in other packages, for example:

package A; my @sorted = sort B::notYetLoaded @unsorted;
We've found workarounds for all of the problems, but each one took time.

Also, I recently tried to use inheritance (we only recently started doing much object-oriented programming). Working with our AUTOLOAD (while trying to preserve its behavior for all our existing code) was ugly enough that I gave up inheritance for now.

I agree with others above who have suggested mod_perl and other cleaner solutions -- you'll get a much bigger boost from mod_perl than from this -- but if those 100K lines of code weren't written with mod_perl's persistence in mind, that could be daunting.

-Joe


In reply to Re: Dealing with large chains of dependent packages by blahblahblah
in thread Dealing with large chains of dependent packages by amw1

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.