Skip Menu |

This queue is for tickets about the RPM-Specfile CPAN distribution.

Report information
The Basics
Id: 36800
Status: new
Priority: 0/
Queue: RPM-Specfile

People
Owner: Nobody in particular
Requestors: EDAVIS [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.51
Fixed in: (no value)



Subject: YAML parsing error should just be warning (patch included)
The META.yml file is used if present, but is not mandatory. Therefore, if there is an error parsing META.yml this should just be a warning. (For an example package that cpanflute2 fails to build, see Devel-FastProf-0.08.tar.gz from CPAN.) Here's a patch: --- cpanflute2~ 2008-02-05 13:50:07.000000000 +0000 +++ cpanflute2 2008-06-16 11:23:32.000000000 +0100 @@ -165,13 +165,21 @@ my $tar = new Archive::Tar; $tar->read("$tmpdir/$tarball", 1); my $contents = $tar->get_content($_); - my $yaml = Load($contents); + my $yaml; + eval { + my $yaml = Load($contents); + }; - while (my ($mod, $ver) = each %{$yaml->{build_requires}}) { - push @build_requires, [ make_prereq_name($mod), $ver ]; + if ($@) { + warn $@; } - while (my ($mod, $ver) = each %{$yaml->{requires}}) { - push @requires, [ make_prereq_name($mod), $ver ]; + else { + while (my ($mod, $ver) = each %{$yaml->{build_requires}}) { + push @build_requires, [ make_prereq_name($mod), $ver ]; + } + while (my ($mod, $ver) = each %{$yaml->{requires}}) { + push @requires, [ make_prereq_name($mod), $ver ]; + } } }