On Sun, Sep 29, 2002 at 12:33:25AM +0200, Elizabeth Mattijsen wrote:
> So the typical use inside a module is to have:
>
> package Your::Module;
> use jit;
>
> in the source. And to place all subroutines that you want to be loadable on
> demand after the (first) __END__.
I have a Clever Idea! The "put things after the __END__ block" hack has
always bothered me about AutoLoader style things. It would be interesting
if one could write their code normally and just put "use jit" at the top and
it worked. jit.pm would really be a source filter. The filter would simply
blow away all the code below "use jit" and install an AUTOLOAD routine. The
AUTOLOAD would then read from $INC{'Your/Module.pm'} rather than *DATA.
--
Michael G. Schwern <schwern@pobox.com> http://www.pobox.com/~schwern/
Perl Quality Assurance <perl-qa@perl.org> Kwalitee Is Job One
kiloconway: unit of extreme mind expansion. Equal to 1024 conways,
one kiloconway gives the sensation that all of the quantuum particles
in your brain have been spontaneously converted into Mars bars (IN
CONSTANT TIME!). The presumed existance of kiloconway scale events
has led many to believe that higher forms of intelligence do in
fact exist, and are living quite happily in Rural Australia.
-- Ziggy
Thread Previous
|
Thread Next