Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CPAN shell problem

Status
Not open for further replies.

doe1967

Technical User
Aug 2, 2008
2
Greetings,

I am a newbie, just learning Perl. My PC is running Vista and has ActivePerl-5.10.0.1003 installed. It runs .pl scripts just fine. However, when I tried to use the CPAN.pm module in the DOS prompt, I ran into a problem.

First, I run "perl -MCPAN -e shell". Then in the CPAN shell, I try to find all modules with "LWP" in them (I have an exercise that tells me to install LWP::Socket. Here is the error I receive:

cpan> i /LWP::/
CPAN: Storable loaded ok (v2.18)
Going to read C:\Perl\cpan\Metadata
Database was generated on Thu, 24 Jul 2008 08:03:12 GMT
Going to read C:\Perl\cpan\sources\authors\01mailrc.txt.gz
CPAN: Compress::Zlib loaded ok (v2.008)
............................................................................DONE

CPAN: LWP::UserAgent loaded ok (v5.810)
CPAN: Time::HiRes loaded ok (v1.9711)
Fetching with LWP:
CPAN: YAML::XS loaded ok (v0.26)
Alert: While trying to 'parse' YAML file
'C:\Perl\cpan\FTPstats.yml'
with 'YAML::XS' the following error was encountered:
Usage: YAML::XS::LibYAML::Load(yaml_str) at C:\Perl\site\lib/YAML/XS.pm line 70.

The line 70 in XS.pm looks like this:

return YAML::XS::LibYAML::Load(do { local $/; <$IN> });

and being a newbie, I have no clue what's wrong with it :)

I reinstalled Perl, but got the same error. Googled it but couldn't find any answers :(

I can actually install this LWP::Socket module using the Perl Package Manager, but I'd love to be able to use command prompt to work with CPAN. Is there a way to find out what this error means and how to fix it?
 
If you use activestate you must use the PPM. I think strawberry perl will allow you to compile your own.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[noevil]
Travis - Those who say it cannot be done are usually interrupted by someone else doing it; Give the wrong symptoms, get the wrong solutions;
 
Thanks a lot, travs69! I uninstalled ActivePerl, installed Strawberry Perl, and everything is working like a charm!

I got a "db prepare failed" error, but after running:

cpan> reload index

I am back in business. I could run:

cpan> install LWP::Socket

and now am able to go on with my training course (the one from scriptsocket.com).

Million thanks again!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top