On Thu, Feb 01, 2001 at 12:24:38PM -0600, Dave Rolsky wrote:
> Here's a gross thought (for implementors at least ;)
>
> If it sees
>
> use CGI qw( param header );
>
> the autoloader could look for a module which implements the 'CGI'
> interface and has those two functions.
Problem is, its extremely difficult to figure out what module
implements what. Sure, if you see a C<sub foo {...}> you have a
pretty good idea that foo() is implemented, but there's all sorts of
not uncommon tricks which make lexical scanning for subroutines nigh
impossible. Consider Class::Accessor, Class::Class or
Class::MethodMaker (those are for methods, which are not important,
but the same technique works for funcitons). Or even CGI.pm's brand
of autoloading (using strings in a hash instead of the usual
subroutines after __END__).
--
Michael G. Schwern <[EMAIL PROTECTED]> http://www.pobox.com/~schwern/
Plus I remember being impressed with Ada because you could write an
infinite loop without a faked up condition. The idea being that in Ada
the typical infinite loop would be normally be terminated by detonation.
-- Larry Wall in <[EMAIL PROTECTED]>