Subject: | Incorrect data handling in metadata gathering code |
Hello,
Thanks again for such a great module! I've used several dists with
this, and it worked perfectly. Then all of a sudden it blew up on
Test::Apocalypse, which is probably my fault ;)
It generated this warning during "dzil build":
Use of uninitialized value in list assignment at
/usr/local/share/perl/5.10.0/Dist/Zilla/Plugin/MetaData/BuiltWith.pm
line 183, <DATA> line 1002.
The culprit is the %modtable assignment code, which *somehow* managed
to replace a module name with a undef! I suspect it's some deep internal
stuff in autobox, but replacing that with this "simple" code solved the
issue:
my %modtable;
foreach my $mod ( $report->flatten, $self->include->flatten ) {
$modtable{ $mod } = $self->_detect_installed( $mod );
}
Also, it might be issues with $_ and aliasing? Here's how I debugged this:
Replacing %modtable with @result and doing this right after the
map/flatten line: die Dumper( $report, \@result )
As you can see, Test::Spelling somehow became undef...
[
"CPANPLUS::Backend",
"CPANPLUS::Configure",
"Data::Dumper",
"Devel::PPPort",
"Exporter",
"File::Find",
"File::Find::Rule",
"File::Slurp",
"File::Spec",
"File::Temp",
"File::Which",
"JSON::Any",
"Module::Build",
"Module::CPANTS::Analyse",
"Module::CoreList",
"Module::Pluggable",
"Perl::Metrics::Simple",
"Perl::PrereqScanner",
"Pod::Coverage::TrustPod",
"Test::AutoLoader",
"Test::Block",
"Test::Builder",
"Test::CPAN::Meta",
"Test::CheckChanges",
"Test::Compile",
"Test::ConsistentVersion",
"Test::Deep",
"Test::Dir",
"Test::DistManifest",
"Test::EOL",
"Test::File",
"Test::Fixme",
"Test::HasVersion",
"Test::JSON::Meta",
"Test::MinimumVersion",
"Test::More",
"Test::NoBreakpoints",
"Test::NoPlan",
"Test::Perl::Critic",
"Test::Pod",
"Test::Pod::Coverage",
"Test::Pod::LinkCheck",
"Test::Pod::No404s",
"Test::Portability::Files",
"Test::Prereq",
"Test::Prereq::Build",
"Test::Script",
"Test::Signature",
"Test::Spelling",
"Test::Strict",
"Test::Synopsis",
"Test::UseAllModules",
"Test::Vars",
"Test::YAML::Meta",
"YAML",
"YAML::Any",
"perl",
"version"
]
[
"CPANPLUS::Backend",
"0.9010",
"CPANPLUS::Configure",
"0.9010",
"Data::Dumper",
"2.128",
"Devel::PPPort",
"3.19",
"Exporter",
"5.63",
"File::Find",
"1.12",
"File::Find::Rule",
"0.32",
"File::Slurp",
"9999.13",
"File::Spec",
"3.33",
"File::Temp",
"0.22",
"File::Which",
"1.09",
"JSON::Any",
"1.25",
"Module::Build",
"0.3607",
"Module::CPANTS::Analyse",
"0.85",
"Module::CoreList",
"2.41",
"Module::Pluggable",
"3.9",
"Perl::Metrics::Simple",
"0.15",
"Perl::PrereqScanner",
"1.000",
"Pod::Coverage::TrustPod",
"0.092832",
"Test::AutoLoader",
"0.03",
"Test::Block",
"0.11",
"Test::Builder",
"0.96",
"Test::CPAN::Meta",
"0.17",
"Test::CheckChanges",
"0.14",
"Test::Compile",
"0.13",
"Test::ConsistentVersion",
"0.2.3",
"Test::Deep",
"0.108",
"Test::Dir",
"1.006",
"Test::DistManifest",
"1.009",
"Test::EOL",
"0.9",
"Test::File",
"1.29",
"Test::Fixme",
"0.04",
"Test::HasVersion",
"0.012",
"Test::JSON::Meta",
"0.09",
"Test::MinimumVersion",
"0.101080",
"Test::More",
"0.96",
"Test::NoBreakpoints",
"0.13",
"Test::NoPlan",
"0.0.6",
"Test::Perl::Critic",
"1.02",
"Test::Pod",
"1.44",
"Test::Pod::Coverage",
"1.08",
"Test::Pod::LinkCheck",
"0.004",
"Test::Pod::No404s",
"0.01",
"Test::Portability::Files",
"0.05",
"Test::Prereq",
"1.037",
"Test::Prereq::Build",
"1.037",
"Test::Script",
"1.07",
"Test::Signature",
"1.10",
undef,
"0.11",
"Test::Strict",
"0.14",
"Test::Synopsis",
"0.06",
"Test::UseAllModules",
"0.12",
"Test::Vars",
"0.001",
"Test::YAML::Meta",
"0.16",
"YAML",
"0.72",
"YAML::Any",
"0.72",
"perl",
"NA(skipped: perl)",
"version",
"0.86"
]
--
~Apocalypse