- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - Linux
- >
- Broken CPAN?
Operating System - Linux
1821625
Members
3303
Online
109633
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2007 06:52 PM
тАО06-11-2007 06:52 PM
Broken CPAN?
Hello,
though I probably should rather seek for help with this at Perlmonks or a similar place,
I know there are a few Perl gurus occassionally flipping through these threads to whom the solution may be right at hand.
I simply fail to install some CPAN module through the CPAN shell because some eval block seems to yield an undef when testing for a method call named "data()".
I am quite convinced that my initial setup of CPAN/Config.pm is ok because it works on other hosts.
Here's the excerpt from my CPAN session:
There's a new CPAN.pm version (v1.9102) available!
[Current version is v1.7602]
You might want to try
install Bundle::CPAN
reload cpan
without quitting the current session. It should be a seamless upgrade
while we are running...
Going to read /home/root/.cpan/sources/modules/03modlist.data.gz
Can't locate object method "data" via package "CPAN::Modulelist" (perhaps you forgot to load "CPAN::Modulelist"?) at (eval 15) line 1.
at /opt/perl5/lib/5.8.8/CPAN.pm line 3405
CPAN::Index::rd_modlist('CPAN::Index', '/home/root/.cpan/sources/modules/03modlist.data.gz') called at /opt/perl5/lib/5.8.8/CPAN.pm line 3128
CPAN::Index::reload('CPAN::Index') called at /opt/perl5/lib/5.8.8/CPAN.pm line 484
CPAN::all_objects('CPAN=HASH(0x80000001009f20c0)', 'CPAN::Author') called at /opt/perl5/lib/5.8.8/CPAN.pm line 1868
CPAN::Shell::expand('CPAN::Shell', 'Author', '/SOAP::Lite/') called at /opt/perl5/lib/5.8.8/CPAN.pm line 1461
CPAN::Shell::i('CPAN::Shell', '/SOAP::Lite/') called at /opt/perl5/lib/5.8.8/CPAN.pm line 201
eval {...} called at /opt/perl5/lib/5.8.8/CPAN.pm line 201
CPAN::shell() called at -e line 1
When I try to manually load the module it also fails:
cpan> !use CPAN::Modulelist
Can't locate CPAN/Modulelist.pm in @INC (@INC contains: /opt/perl5/lib/5.8.8/PA-RISC2.0-LP64 /opt/perl5/lib/5.8.8 /opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-LP64 /opt/perl5/lib/site_perl/5.8.8 /opt/perl5/lib/site_perl) at (eval 16) line 2, line 13.
BEGIN failed--compilation aborted at (eval 16) line 2, line 13.
I invoked "perldoc -m CPAN" to check the suspicious eval block only to notice that this has been a misnomer and instead relates to a pushing op onto a namesake eval array
(Hey, hasn't Andreas Koenig read Conway's rants in "Best Practices" about uninspired naming conventions?).
Obviously things go awry at line 3400.
This is the critical code section of CPAN.pm:
3399 undef $fh;
3400 push @eval, q{CPAN::Modulelist->data;};
3401 local($^W) = 0;
3402 my($comp) = Safe->new("CPAN::Safe1");
3403 my($eval) = join("", @eval);
3404 my $ret = $comp->reval($eval);
3405 Carp::confess($@) if $@;
3406 return if $CPAN::Signal;
3407 for (keys %$ret) {
3408 my $obj = $CPAN::META->instance("CPAN::Module",$_);
3409 delete $ret->{$_}{modid}; # not needed here, maybe elsewhere
3410 $obj->set(%{$ret->{$_}});
3411 return if $CPAN::Signal;
3412 }
My (superficial) search at search.cpan.org didn't yield a match for some package CPAN::Modulelist either.
Regards
Ralph
though I probably should rather seek for help with this at Perlmonks or a similar place,
I know there are a few Perl gurus occassionally flipping through these threads to whom the solution may be right at hand.
I simply fail to install some CPAN module through the CPAN shell because some eval block seems to yield an undef when testing for a method call named "data()".
I am quite convinced that my initial setup of CPAN/Config.pm is ok because it works on other hosts.
Here's the excerpt from my CPAN session:
There's a new CPAN.pm version (v1.9102) available!
[Current version is v1.7602]
You might want to try
install Bundle::CPAN
reload cpan
without quitting the current session. It should be a seamless upgrade
while we are running...
Going to read /home/root/.cpan/sources/modules/03modlist.data.gz
Can't locate object method "data" via package "CPAN::Modulelist" (perhaps you forgot to load "CPAN::Modulelist"?) at (eval 15) line 1.
at /opt/perl5/lib/5.8.8/CPAN.pm line 3405
CPAN::Index::rd_modlist('CPAN::Index', '/home/root/.cpan/sources/modules/03modlist.data.gz') called at /opt/perl5/lib/5.8.8/CPAN.pm line 3128
CPAN::Index::reload('CPAN::Index') called at /opt/perl5/lib/5.8.8/CPAN.pm line 484
CPAN::all_objects('CPAN=HASH(0x80000001009f20c0)', 'CPAN::Author') called at /opt/perl5/lib/5.8.8/CPAN.pm line 1868
CPAN::Shell::expand('CPAN::Shell', 'Author', '/SOAP::Lite/') called at /opt/perl5/lib/5.8.8/CPAN.pm line 1461
CPAN::Shell::i('CPAN::Shell', '/SOAP::Lite/') called at /opt/perl5/lib/5.8.8/CPAN.pm line 201
eval {...} called at /opt/perl5/lib/5.8.8/CPAN.pm line 201
CPAN::shell() called at -e line 1
When I try to manually load the module it also fails:
cpan> !use CPAN::Modulelist
Can't locate CPAN/Modulelist.pm in @INC (@INC contains: /opt/perl5/lib/5.8.8/PA-RISC2.0-LP64 /opt/perl5/lib/5.8.8 /opt/perl5/lib/site_perl/5.8.8/PA-RISC2.0-LP64 /opt/perl5/lib/site_perl/5.8.8 /opt/perl5/lib/site_perl) at (eval 16) line 2,
BEGIN failed--compilation aborted at (eval 16) line 2,
I invoked "perldoc -m CPAN" to check the suspicious eval block only to notice that this has been a misnomer and instead relates to a pushing op onto a namesake eval array
(Hey, hasn't Andreas Koenig read Conway's rants in "Best Practices" about uninspired naming conventions?).
Obviously things go awry at line 3400.
This is the critical code section of CPAN.pm:
3399 undef $fh;
3400 push @eval, q{CPAN::Modulelist->data;};
3401 local($^W) = 0;
3402 my($comp) = Safe->new("CPAN::Safe1");
3403 my($eval) = join("", @eval);
3404 my $ret = $comp->reval($eval);
3405 Carp::confess($@) if $@;
3406 return if $CPAN::Signal;
3407 for (keys %$ret) {
3408 my $obj = $CPAN::META->instance("CPAN::Module",$_);
3409 delete $ret->{$_}{modid}; # not needed here, maybe elsewhere
3410 $obj->set(%{$ret->{$_}});
3411 return if $CPAN::Signal;
3412 }
My (superficial) search at search.cpan.org didn't yield a match for some package CPAN::Modulelist either.
Regards
Ralph
Madness, thy name is system administration
- Tags:
- Perl
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2007 07:32 PM
тАО06-11-2007 07:32 PM
Re: Broken CPAN?
Admittedly, I haven't cared too much about the inards of CPAN.pm yet.
Having a look at the contents of my locally stored modlist.gz file (which has a rather dated mtime) I only now have realized that the new namespace CPAN::Modulelist together with a sub data() is defined and presumably pulled in on the fly in this very gziped file.
See
# gzip -dc .cpan/sources/modules/03modlist.data.gz |nl|head -23|tail -13
10 package CPAN::Modulelist;
11 # Usage: print Data::Dumper->new([CPAN::Modulelist->data])->Dump or similar
12 # cannot 'use strict', because we normally run under Safe
13 # use strict;
14 sub data {
15 my $result = {};
16 my $primary = "modid";
17 for (@$CPAN::Modulelist::data){
18 my %hash;
19 @hash{@$CPAN::Modulelist::cols} = @$_;
20 $result->{$hash{$primary}} = \%hash;
21 }
22 $result;
Maybe, it will help if I just download a more recent modlist from a nearby CPAN mirror and retry with it...?
Having a look at the contents of my locally stored modlist.gz file (which has a rather dated mtime) I only now have realized that the new namespace CPAN::Modulelist together with a sub data() is defined and presumably pulled in on the fly in this very gziped file.
See
# gzip -dc .cpan/sources/modules/03modlist.data.gz |nl|head -23|tail -13
10 package CPAN::Modulelist;
11 # Usage: print Data::Dumper->new([CPAN::Modulelist->data])->Dump or similar
12 # cannot 'use strict', because we normally run under Safe
13 # use strict;
14 sub data {
15 my $result = {};
16 my $primary = "modid";
17 for (@$CPAN::Modulelist::data){
18 my %hash;
19 @hash{@$CPAN::Modulelist::cols} = @$_;
20 $result->{$hash{$primary}} = \%hash;
21 }
22 $result;
Maybe, it will help if I just download a more recent modlist from a nearby CPAN mirror and retry with it...?
Madness, thy name is system administration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2007 07:43 PM
тАО06-11-2007 07:43 PM
Re: Broken CPAN?
Nope,
I wgot ftp://ftp.cs.tu-berlin.de/pub/lang/perl/CPAN/modules/03modlist.data.gz
which at least was 68% bigger (probably due to a lot of newly uploaded stuff compared to the state of my old modlist file).
But when running a search or install command in the CPAN shell I still get the same error.
I wgot ftp://ftp.cs.tu-berlin.de/pub/lang/perl/CPAN/modules/03modlist.data.gz
which at least was 68% bigger (probably due to a lot of newly uploaded stuff compared to the state of my old modlist file).
But when running a search or install command in the CPAN shell I still get the same error.
Madness, thy name is system administration
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО06-11-2007 10:03 PM
тАО06-11-2007 10:03 PM
Re: Broken CPAN?
I have absolutely no bearing.
This time I retried the install of XML::SAX modules through CPAN shell, and it miraculously worked.
But I cannot find an inkling why it worked now.
The only thing I did was this time manually editing /opt/perl/lib/5.8.8/CPAN/Config.pm to delete a line which held a key value pair of proxy_passwd that I had before added through CPAN shell's "o conf var val" and "o conf commit" mechanism (Blimey, why doesn't have it a way to also unset wrong pairs interactively?).
I realized that the proxy environment variable's correct name that LWP honours is rather proxy_pass.
If this really has been the cause then the displayed symptoms were pretty misleading.
Under these circumstances I rather would have expected the module to fail when it rerequests my proxy credentials.
This time I retried the install of XML::SAX modules through CPAN shell, and it miraculously worked.
But I cannot find an inkling why it worked now.
The only thing I did was this time manually editing /opt/perl/lib/5.8.8/CPAN/Config.pm to delete a line which held a key value pair of proxy_passwd that I had before added through CPAN shell's "o conf var val" and "o conf commit" mechanism (Blimey, why doesn't have it a way to also unset wrong pairs interactively?).
I realized that the proxy environment variable's correct name that LWP honours is rather proxy_pass.
If this really has been the cause then the displayed symptoms were pretty misleading.
Under these circumstances I rather would have expected the module to fail when it rerequests my proxy credentials.
Madness, thy name is system administration
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Learn About
News and Events
Support
© Copyright 2025 Hewlett Packard Enterprise Development LP