develooper Front page | perl.perl6.language | Postings from February 2001

Re: Really auto autoloaded modules

Thread Previous | Thread Next
From:
Michael G Schwern
Date:
February 1, 2001 09:34
Subject:
Re: Really auto autoloaded modules
Message ID:
20010201123356.A10191@blackrider.aocn.com
On Thu, Feb 01, 2001 at 10:14:20AM -0500, Dan Sugalski wrote:
> One of the features of perl 6 is going to be the ability to automatically 
> use a module if one or more preregistered functions are used in your 
> source.
> 
> Would someone care to take a shot at formalizing the system? We need a way 
> to register these functions, track the module version (if any) they're in, 
> and stuff like that. (Including, I'm sure, things I've forgotten)

Have a look at AnyLoader in CPAN.

NAME
       AnyLoader - Automagically loads modules for fully
       qualified functions

SYNOPSIS
         use AnyLoader;

         Carp::croak("This is going to hurt the Perl community more than it ".
                     "is going to hurt you!");

Its not quite what you're talking about (yet) but we can extend it to
flesh out the idea of automagical autoloading.


-- 

Michael G. Schwern   <schwern@pobox.com>    http://www.pobox.com/~schwern/
Communism is the antichrist, which promised to bring peace and equality to
mankind, only to be disproved by the work of time.
	     --Alex Chiu, Immortality Guy

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About