sakoht has asked for the wisdom of the Perl Monks concerning the following question:
I have some code I'm packaging for CPAN release, which includes some logic to do JIT loading of modules by implementing UNIVERSAL::AUTOLOAD.
Given that there is only one UNIVERSAL::AUTOLOAD, I broke that part out into a module, and added an API so that the feature can be shared, tentatively calling it Class::AutoLoader.
ex.:
use Class::AutoLoader "My::Thing"; use Class::AutoLoader qr/SomeNamespace::.*/; use Class::AutoLoader \&my_class_generator;
I talked with Stevan Little and Rob Kinyon, who wrote Class::LazyLoad, about merging features. Stevan sent me to Rob, and Rob suggested I post here for suggestions.
Rob (Dragonchild) suggested I indicate he had "vague reservations I can't explain".
He mentioned that perl6 has had something like this for a while, and that following that name/API might be good. (I think its a pragma, "use autoloader ....");
Any comments or suggestions on naming, API, other modules which do this I haven't found, etc?
The source is 206 lines, including POD, so I'd be glad to post it or mail it to the curious if the SYNOPSIS above isn't sufficient.
Thanks in advance...
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: appropriate name/place for module which does JIT loading of modules
by Joost (Canon) on Dec 15, 2007 at 20:45 UTC | |
by sakoht (Initiate) on Dec 15, 2007 at 21:03 UTC | |
Re: appropriate name/place for module which does JIT loading of modules
by shmem (Chancellor) on Dec 16, 2007 at 17:57 UTC | |
by sakoht (Initiate) on Dec 16, 2007 at 21:16 UTC | |
by sakoht (Initiate) on Jan 07, 2008 at 02:47 UTC |