in reply to Re^4: Using a module more than once
in thread Using a module more than once

Interesting. And it comes with perl 5.8.7, no less. But so does autouse. Its purpose looks similar.
SelfLoader
load functions only on demand
autouse
postpone load of modules until a function is used

So... what's the difference between SelfLoader and autouse? And which is "best"?

Replies are listed 'Best First'.
Re^6: Using a module more than once
by techra (Pilgrim) on Aug 02, 2005 at 17:27 UTC

    I don't know much about autouse, as I haven't tried it out. It looks like autouse's purpose is more context-oriented while SelfLoader is useful in a broader context. The benefit of delaying a 'use Module' command is a side-effect of SelfLoader, while it seems to be the main purpose of autouse.

    SelfLoader delays the compilation of methods/subroutines until they are called, while autouse delays the execution of 'using' a module until it is explicitly called.