This queue is for tickets about the CPAN CPAN distribution.

Report information
The Basics

Nobody in particular
csjewell [...]

(no value)
Broken in:
(no value)
Fixed in:
(no value)

Conversation on (#toolchain, IIRC) <DrHyde> klapperl: can be astonishingly slow building Metadata on some of my testers, particularly the netbsd/alpha box, but i don't consider it to be a problem. if anyone thinks i should be outraged, i can time it if you like :-) <klapperl> if memory is low we need DBD::SQLite, this much is known; the other dangerous thing is to use instead of YAML::{XS,Syck} So I put in RT#54729 on Strawberry to remind myself to use YAML::XS [Alias' preference of the XS YAML modules] as the YAML reader for Strawberry. I changed the default settings that are put in place, and once I did that, I had this output the first time the build tried to execute a script against the new CPAN [when we try and get information on which modules need upgrading at the beginning, so this is before CPAN::SQLite is installed on Strawberry - the script in question is attached as, and the ftpstats.yml file is also attached.]: Loading CPAN... Loading Storable... CPAN::SQLite not installed, trying to work without Fetching with LWP: Going to read 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz' ............................................................................DONE Fetching with LWP: Alert: While trying to 'parse' YAML file 'C:\strawberry\cpan\FTPstats.yml' with 'YAML::XS' the following error was encountered: Usage: YAML::XS::LibYAML::Load(yaml_sv) at C:\strawberry\perl\vendor\lib/YAML/ line 70. Again, I'm not claiming that this is necessarily a bug in, but it happens to be exposed by it. [It may be a bug in YAML::XS, after all.]
Subject: FTPstats.yml
--- history: - attempts: - method: dleasy start: 1266944578.59143 url: &1 !!perl/hash:CPAN::URL FROM: USER TEXT: end: 1266944580.86358 file: authors/01mailrc.txt.gz filesize: 166010 start: 1266944578.59031 thesiteurl: *1
print "Loading CPAN...\n"; use CPAN; CPAN::HandleConfig->load unless $CPAN::Config_loaded++; $CPAN::Config->{'urllist'} = [ '' ]; print "Loading Storable...\n"; use Storable qw(nstore); my ($module, %seen, %need, @toget); my @modulelist = CPAN::Shell->expand('Module', '/./'); # Schwartzian transform from my @expand; @expand = map { $_->[1] } sort { $b->[0] <=> $a->[0] || $a->[1]{ID} cmp $b->[1]{ID}, } map { [$_->_is_representative_module, $_ ] } @modulelist; MODULE: for $module (@expand) { my $file = $module->cpan_file; # If there's no file to download, skip it. next MODULE unless defined $file; $file =~ s{^./../}{}; my $latest = $module->cpan_version; my $inst_file = $module->inst_file; my $have; my $next_MODULE; eval { # involved! if ($inst_file) { $have = $module->inst_version; local $^W = 0; ++$next_MODULE unless CPAN::Version->vgt($latest, $have); # to be pedantic we should probably say: # && !($have eq "undef" && $latest ne "undef" && $latest gt ""); # to catch the case where CPAN has a version 0 and we have a version undef } else { ++$next_MODULE; } }; next MODULE if $next_MODULE; if ($@) { next MODULE; } $seen{$file} ||= 0; next MODULE if $seen{$file}++; push @toget, $module; $need{$module->id}++; } unless (%need) { print "All modules are up to date\n"; } nstore \@toget, 'C:\tmp\output\'; print "Completed collecting information on all modules\n"; exit 0;
Subject: YAML::XS is not called correctly when it is set to be the yaml_module.
Oh. FYI: I install 1.94_56 as part of the "toolchain" (along with YAML::XS and about 25 other modules) before I make this call, but it's done via running "the mantra" through IPC::Run3, not by using
On Tue Feb 23 17:30:11 2010, CSJEWELL wrote:
Show quoted text
> Oh. FYI: I install 1.94_56 as part of the "toolchain" (along with > YAML::XS and about 25 other modules) before I make this call, but it's > done via running "the mantra" through IPC::Run3, not by using
Incorrect information, sorry. It's 1.9402 at this point on 5.10.1. Apparently I install _56 a little later. (if it needed upgraded to 1.9402, it'd install 1.94_56 instead during the mantra stage. If not, 1.94_56 is installed along with the modules detected by this script.) But I have a "cut-and-paste" of a debugging session that I've attached here, for what it's worth, and I seem to have found the reason for the problem - the FTPstats.yml file didn't get written to until I had quit the debugger, so it was allocated but empty at the time of the LoadFile call. I don't know if the file write is something can force or not, but that's the problem.
Subject: Debugging session.txt
C:\strawberry\perl\bin>perl -d c:\tmp\build\ Loading DB routines from version 1.32 Editor support available. Enter h or `h h' for help, or `perldoc perldebug' for more help. main::(c:\tmp\build\ 1: print "Loading CPAN...\n"; DB<1> c 10 Loading CPAN... Loading Storable... main::(c:\tmp\build\ 10: my @modulelist = CPAN::Shell->expand('Module', '/./'); DB<2> s CPAN::Shell::expand(C:\strawberry\perl\lib/CPAN/ 1251: my $self = shift; DB<2> c 1288 CPAN::SQLite not installed, trying to work without CPAN::Shell::expand_by_method(C:\strawberry\perl\lib/CPAN/ 1288: for $obj ( 1289: $CPAN::META->all_objects($class) 1290: ) { DB<3> s CPAN::all_objects(C:/strawberry/perl/lib/ 689: my($mgr,$class) = @_; DB<3> c 692 CPAN::all_objects(C:/strawberry/perl/lib/ 692: CPAN::Index->reload; DB<4> s CPAN::Index::reload(C:\strawberry\perl\lib/CPAN/ 42: my($self,$force) = @_; DB<4> $CPAN::DEBUG=1 DB<5> c 84 CPAN::Index::reload(C:\strawberry\perl\lib/CPAN/ 84: my $localized = $self->reload_x($remote, $localpath, $force) ; DB<6> n Fetching with LWP: CPAN::Index::reload(C:\strawberry\perl\lib/CPAN/ 85: $self->$reader($localized); # may die but we let the shell c atch it DB<6> c 84 Going to read 'C:\strawberry\cpan\sources\authors\01mailrc.txt.gz' ............................................................................DONE CPAN::Index::reload(C:\strawberry\perl\lib/CPAN/ 84: my $localized = $self->reload_x($remote, $localpath, $force) ; DB<7> s CPAN::Index::reload_x(C:\strawberry\perl\lib/CPAN/ 206: my($cl,$wanted,$localname,$force) = @_; DB<7> c 225 CPAN::Index::reload_x(C:\strawberry\perl\lib/CPAN/ 225: return CPAN::FTP->localize($wanted,$abs_wanted,$force); DB<8> s CPAN::FTP::localize(C:\strawberry\perl\lib/CPAN/ 271: my($self,$file,$aslocal,$force) = @_; DB<8> c 468 Fetching with LWP: CPAN::FTP::localize(C:\strawberry\perl\lib/CPAN/ 468: $self->_add_to_statistics($stats); DB<9> s CPAN::FTP::_add_to_statistics(C:\strawberry\perl\lib/CPAN/ 79: my($self,$stats) = @_; DB<9> c 90 CPAN::FTP::_add_to_statistics(C:\strawberry\perl\lib/CPAN/ 90: my $fullstats = $self->_ftp_statistics($fh); DB<10> s CPAN::FTP::_ftp_statistics(C:\strawberry\perl\lib/CPAN/ 21: my($self,$fh) = @_; DB<10> c 41 CPAN::FTP::_ftp_statistics(C:\strawberry\perl\lib/CPAN/ 41: my $stats = eval { CPAN->_yaml_loadfile($file); }; DB<11> x $file 0 'C:\\strawberry\\cpan\\FTPstats.yml' DB<12> x $CPAN::VERSION 0 1.9402 DB<13> s CPAN::FTP::_ftp_statistics(C:\strawberry\perl\lib/CPAN/ 41: my $stats = eval { CPAN->_yaml_loadfile($file); }; DB<13> s CPAN::_yaml_loadfile(C:/strawberry/perl/lib/ 546: my($self,$local_file) = @_; DB<13> c 559 CPAN::_yaml_loadfile(C:/strawberry/perl/lib/ 559: eval { @yaml = $code->($local_file); }; DB<14> x $code 0 CODE(0x206f804) -> &YAML::XS::LoadFile in C:\strawberry\perl\vendor\lib/YAML/ DB<15> x $local_file 0 'C:\\strawberry\\cpan\\FTPstats.yml' DB<16> s CPAN::_yaml_loadfile(C:/strawberry/perl/lib/ 559: eval { @yaml = $code->($local_file); }; DB<16> s YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/ 61: my $IN; DB<16> n YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/ 62: my $filename = shift; DB<16> n YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/ 63: if (ref $filename eq 'GLOB') { DB<16> n YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/ 67: open $IN, $filename 68: or die "Can't open '$filename' for input:\n$!"; DB<16> n YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/ 70: return YAML::XS::LibYAML::Load(do { local $/; <$IN> }); DB<16> s YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/ 70: return YAML::XS::LibYAML::Load(do { local $/; <$IN> }); DB<16> s YAML::XS::LoadFile(C:\strawberry\perl\vendor\lib/YAML/ 70: return YAML::XS::LibYAML::Load(do { local $/; <$IN> }); DB<16> s CPAN::_yaml_loadfile(C:/strawberry/perl/lib/ 560: if ($@) { DB<16> x $@ 0 'Usage: YAML::XS::LibYAML::Load(yaml_sv) at C:\\strawberry\\perl\\vendor\\lib /YAML/ line 70. ' DB<17> #################### At this point, the error has occured. I checked while I was still in the debugger and the FTPstats.yml file has 292 bytes allocated to it, but it is empty (which makes it understandable why it would blow up!) I hit 'q' and I get YAML content in the file... maybe either or YAML::XS needs to flush writes?

This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with to