1. unshifts a sub ref/object to @INC which when use X is encountered will install an AUTOLOAD stub for package X.
2. The AUTOLOAD stub will 1) remove itself from package X and 2) perform a do on the real path of the module and 3) goto &$AUTOLOAD.
The main purpose would be to avoid loading/compiling a module until when one of its subroutines was actually called. It wouldn't work for all modules (such as meta-programming modules or ones that exported symbols), but it could work for fairly "conventional" modules.
Does anything like that currently exist?
In reply to lazy loading of modules by perl5ever
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |