On Mon, Feb 05, 2001 at 09:15:45AM -0200, Branden wrote:
> Well, I think this could be handled by Perl itself. I don't know if there's
> a way of doing it directly with CPAN, but I think it should be independent
> of CPAN, since there could be proprietary modules, that someone would like
> to expose only to their own users.
If the proprietary modules were kept in a CPANish structure, then they
could just point CPAN.pm at the machine with that structure. CPAN.pm
could also be modified such that the user gets to tell it where to
look in detail (e.g., in some directory rather than on a CPAN mirror)
> So, what I propose is attaching a URL to
> each `use'-d module, as
>
> # use Bar & Baz
> use Bar URL => 'http://www.cpan.org/modules/Bar';
> use Baz URL => 'ftp://my.local.domain/pub/share/perl-modules/Baz', VERSION
> => 2.0;
>
> This way, Perl could automatically fetch and install modules (supposing
> module install is not so hard as now, involving makefiles, and such...). And
> this could also be used to identify interfaces. That's only an idea, but I
> think it can lead to good things.
I think that, if you want this behavior, a module that implements it
would be just fine. (Why muck with "use"?) To use a module name
that seems like it could fit this purpose:
use autoload { Bar => 'http://www.cpan.org/modules/Bar' },
{ Baz => 'ftp://my.local.domain/perl-modules/Baz', VERSION => 2 };
Here are some questions:
* Is @INC searched prior to attempting to fetch the module via the URL?
* If so, what happens if there is higher version in @INC?
* What happens when the module isn't found?
* What happens when the requested version isn't found?
-Scott
--
Jonathan Scott Duff
[EMAIL PROTECTED]