Perl CPAN: Modulelist solution

Source: Internet
Author: User
Tags eval readline

This error was reported when CPAN was used to install the Term: ReadLine.

Going to read/root/. cpan/sources/modules/
Can't locate object method "data" via package "CPAN: Modulelist" (perhaps you forgot to load "CPAN: Modulelist "?) At (eval 31) line 1.
At/usr/lib/perl5/5.8.5/CPAN. pm line 3406
CPAN: Index: rd_modlist ('cpan: index', '/root /. cpan/sources/modules/ ') called at/usr/lib/perl5/5.8.5/CPAN. pm line 3129
CPAN: Index: reload ('cpan: index') called at/usr/lib/perl5/5.8.5/CPAN. pm line 675
CPAN: exists ('cpan = HASH (0x9c79658) ', 'cpan: module', 'term: readline ') called at/usr/lib/perl5/5.8.5/CPAN. pm line 1842
CPAN: Shell: expandany ('cpan: shell', 'term: readline') called at/usr/lib/perl5/5.8.5/CPAN. pm line 2078
CPAN: Shell: rematein ('cpan: shell', 'Install', 'term: readline') called at/usr/lib/perl5/5.8.5/CPAN. pm line 2165
CPAN: Shell: install ('cpan: shell', 'term: readline') called at/usr/lib/perl5/5.8.5/CPAN. pm line 201 eval {...} called at/usr/lib/perl5/5.8.5/CPAN. pm line 201 CPAN: shell () called at-e line 1

Google's results are resolved in this way.

Rm-rf ~ /. Cpan
After deletion, execute reload index in perl-MCPAN-e shell.
Then execute install Bundle: CPAN
Run reload CPAN to run the command line install MODULES.

I followed this operation and returned an error when executing the reload index statement. Continue to google and find that it is a Config. pm problem. Reconfigure it.

Cpan> o conf urllist unshift
Cpan> o conf commit

Then, execute the above reload index and the subsequent steps will be OK.


Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.