SPUG: Re: CPAN install from CD (i.e. without Internet)
Jay Scherrer
jay at scherrer.com
Wed Nov 24 11:57:50 CST 2004
Michael,
One good thing about Open Source, You can look to the source.
If you keep your cd mounted you should be able to point your configs
to your cdrom with out any problem. But like was said earlier, you
could copy the cd to a http, ftp or pub directory, then point the
CPAN::Config there.
Change:
'urllist' => [q[http://www.perl.com/CPAN/]],
to point to your localhost:
'urllist' => [q[http://localhost/CPAN/]],
Taken from package LWP::Protocol::cpan;
###Section CPAN.pm###
unless ($CPAN) {
# Try to find local CPAN mirror via $CPAN::Config
eval {
require CPAN::Config;
if($CPAN::Config) {
my $urls = $CPAN::Config->{urllist};
if (ref($urls) eq "ARRAY") {
my $file;
for (@$urls) {
if (/^file:/) {
$file = $_;
last;
}
}
###End Section###
###Directory Listing located in CPAN::Config###
$CPAN::Config = {
###
'urllist' => [q[http://www.perl.com/CPAN/]],
}
####
Jay Scherrer
On Tuesday 23 November 2004 07:27 pm, michaelrwolf at att.net wrote:
> > How about putting the files you need onto your LAN and update
> > your: $CPAN::Config->{urllist};
>
> How can I figure out what files I need? It appears that the
> "install somemodule" does an iterative, recursive lookup that
> cannot be figured out at the start.
>
> In the worst of cases, I can't even assume a LAN.
>
> Can the URL list include something that points to the local CD?
>
> _____________________________________________________________
> Seattle Perl Users Group Mailing List
> POST TO: spug-list at mail.pm.org http://spugwiki.perlocity.org/
> ACCOUNT CONFIG: http://mail.pm.org/mailman/listinfo/spug-list
> MEETINGS: 3rd Tuesdays, Location: Amazon.com Pac-Med
> WEB PAGE: http://seattleperl.org/
More information about the spug-list
mailing list