in reply to AutoLoader - when to use it?

Interesting timing on this question. I received the latest IBM developerWorks newletter in today's email and inside I find an article about optimizing Perl.

One of the suggestions was to use AutoLoader. The full article is available here. Registration is required so I can cut and paste the pertinant portion of the article if it's OK with the powers that be. I'll avoid any copyright problems for now by not quoting from the article here but the gist of the argument for AutoLoader is that it acts as a sort of dynamic loader for modules and, when used in conjunction with AutoSplit, only loads the functions you actually use which shortens load and compile time and shrinks program size.

Could anyone comment on this? I've never used AutoLoader so I have no knowledge of nor opinion about the wisdom (or lack thereof) about doing this.

Jack

Cogito cogito, ergo cogito sum
(I think I think, therefore I think I am)

Replies are listed 'Best First'.
Re^2: AutoLoader - when to use it?
by tilly (Archbishop) on Oct 26, 2004 at 02:26 UTC
    That article is of horrible quality. I'd suggest that you disregard most of what it has to say.

    About AutoLoader, if you won't use most of the functions, then it should be faster. If you use a significant fraction of them, then your code will be slower. It makes development more complicated. Furthermore load time may or may not be what you want to focus on. For instance in a web environment you really want to use mod_perl and preload as much as feasible - so AutoLoader is definitely a loss.

      That article is of horrible quality.
      Maybe that is why it (and the rest of the site) is behind a password threshold? :)