in reply to AutoLoader - when to use it?

Um, AutoLoader and autouse are different modules that do somewhat related things. Both try to delay actually loading code to runtime. If you might not need to load the code, that can be a win. If you do load the code then you'd have beeen far better off doing it up front. (There are many penalties with doing things at runtime, for instance you blow the functionmethod cache.) In general I'd lean towards using neither, seeing both as Premature Optimization until the need is proven, and the win is demonstrable.

Of the two, I'd prefer autouse because it doesn't complicate the development process nearly as much. Also AutoLoader installs an AUTOLOAD (see perlsub for details) and those get in the way in many scenarios (particularly when you get into OO Perl).

UPDATE: I have no idea why I wrote function when I meant method...

Replies are listed 'Best First'.
Re^2: AutoLoader - when to use it?
by kiat (Vicar) on Oct 26, 2004 at 01:37 UTC
    Thanks, tilly!

    That was really helpful :) I'll stick to using autouse then.