Beefy Boxes and Bandwidth Generously Provided by pair Networks
The stupid question is the question not asked
 
PerlMonks  

YAML Parsing Errors Using CPAN on Windows

by roho (Bishop)
on Feb 05, 2010 at 18:20 UTC ( [id://821624]=perlquestion: print w/replies, xml ) Need Help??

roho has asked for the wisdom of the Perl Monks concerning the following question:

I am consistently getting YAML parsing errors trying to install modules on Windows using cpan (see output below). I have tried deleting the 'cpan' directory under 'C:\Perl' and rerunning the cpan install, but I get the same errors. Any ideas on how I might correct this?

I am running Activestate Perl 5.8.9. I first tried using 'ppm' but 'HTML::TreeBuilder' was not in Activestate's archive, hence the attempt to use 'cpan'.

TIA, Roy

C:\>cpan cpan shell -- CPAN exploration and modules installation (v1.9402) Enter 'h' for help. cpan> install HTTP::TreeBuilder Fetching with LWP: http://ppm.activestate.com/CPAN/authors/01mailrc.txt.gz Going to read 'C:\Perl\cpan\sources\authors\01mailrc.txt.gz' ...................................................................... +......DONE Fetching with LWP: http://ppm.activestate.com/CPAN/modules/02packages.details.txt.gz 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_sv) at C:\Perl\lib/YAML/XS.pm li +ne 70. Going to read 'C:\Perl\cpan\sources\authors\01mailrc.txt.gz' ...................................................................... +......DONE Going to read 'C:\Perl\cpan\sources\modules\02packages.details.txt.gz' Database was generated on Wed, 03 Feb 2010 22:45:58 GMT ...................................................................... +......DONE Fetching with LWP: http://ppm.activestate.com/CPAN/modules/03modlist.data.gz 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_sv) at C:\Perl\lib/YAML/XS.pm li +ne 70. Lockfile removed.
C:\>

"Its not how hard you work, its how much you get done."

Replies are listed 'Best First'.
Re: YAML Parsing Errors Using CPAN on Windows
by Anonymous Monk on Feb 05, 2010 at 19:57 UTC
    I had the same problem. The solution was to make CPAN stop loading YAML, but I don't remember exactly how. Here's what o conf shows me for yaml vars:
    yaml_load_code [undef] yaml_module []
    I don't know how to undef a value from within CPAN, and perldoc isn't helpful for the shell, but I assume somebody here knows. As a last resort you could edit CPAN.pm. And don't forget to o conf commit to write any changes to disk from within the CPAN shell.
      from within cpan shell, enter: o conf yaml_module "" o conf commit
        - this appears to be mostly a permissions error (and YAML module error) under windows. <thus the unix'ie perl guys don't see this error.> The cpan error response is mostly unhelpful...but if you just rename the file, then cpan appears to fix itself. I was able to load/reload Yaml. This looks like a cpan/perl installation induced bug. If this file needs to be rename it should be installed in a location that has sufficient permissions...nuff said.

        - don't know what is up with the HTML::EP suggestion. That seems a bit pointless to install that module without a need...

        - oh, also, disabling yaml via o conf will not correct the problem until the FTPStats.yml file is renamed...

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://821624]
Approved by Corion
Front-paged by ww
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others learning in the Monastery: (5)
As of 2024-04-18 15:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found