I encountered problems when trying to extend CPAN.pm's urllist
configuration parameter with a local url by exporting it as an
environment variable under the name CPANSITE as described in this
module's documentation. Though I am not too familiar with CPAN.pm's
internals I came up with a patch supplied as an attachment to this
email. It seems like that CPAN::HandleConfig is wrapping CPAN.pm's
config data structure rather than CPAN::Config.
As this patch has been a quick fix, I would ask someone with deeper
insight in the internals to verify it before applying.
Subject: | Patch.txt |
diff -Naur old/Site.pm new/Site.pm
--- old/Site.pm 2008-04-11 10:49:36.000000000 +0200
+++ new/Site.pm 2008-04-11 10:49:16.000000000 +0200
@@ -10,6 +10,7 @@
use vars '$VERSION';
$VERSION = '0.20';
use base 'CPAN';
+use CPAN::HandleConfig;
my $reload_orig;
BEGIN {
@@ -25,7 +26,7 @@
goto &$import;
}
-CPAN::Config->load if CPAN::Config->can('load');
+CPAN::HandleConfig->load if CPAN::HandleConfig->can('load');
if(my $urls = $ENV{CPANSITE})
{ unshift @{$CPAN::Config->{urllist}}, split ' ', $urls;