Subject: | bug in Dist::Zilla::Plugin::DynamicPrereqs 0.037 |
Date: | Mon, 26 Oct 2020 11:01:42 +0100 |
To: | bug-Dist-Zilla-Plugin-DynamicPrereqs [...] rt.cpan.org |
From: | bekuno [...] sags-per-mail.de |
Hello,
There is a bug in Dist::Zilla::Plugin::DynamicPrereqs 0.037.
It is used in libwww-perl.
Please see at https://metacpan.org/source/OALDERS/libwww-perl-6.49/Makefile.PL
Here this code was inserted by Dist::Zilla::Plugin::DynamicPrereqs:
# inserted by Dist::Zilla::Plugin::DynamicPrereqs 0.037
sub _add_prereq {
my ($mm_key, $module, $version_or_range) = @_;
$version_or_range ||= 0;
warn "$module already exists in $mm_key (at version $WriteMakefileArgs{$mm_key}{$module}) -- need to do a sane metamerge!"
if exists $WriteMakefileArgs{$mm_key}{$module}
and $WriteMakefileArgs{$mm_key}{$module} ne '0'
and $WriteMakefileArgs{$mm_key}{$module} ne $version_or_range;
warn "$module already exists in FallbackPrereqs (at version $FallbackPrereqs{$mm_key}{$module}) -- need to do a sane metamerge!"
if exists $FallbackPrereqs{$module} and $FallbackPrereqs{$module} ne '0'
and $FallbackPrereqs{$module} ne $version_or_range;
$WriteMakefileArgs{$mm_key}{$module} = $FallbackPrereqs{$module} = $version_or_range;
return;
}
This leads to this result:
HTTP::Status already exists in PREREQ_PM (at version 6.07) -- need to do a sane metamerge! at Makefile.PL line 159.
Use of uninitialized value in concatenation (.) or string at Makefile.PL line 162.
HTTP::Status already exists in FallbackPrereqs (at version ) -- need to do a sane metamerge! at Makefile.PL line 162.
HTTP::Status already exists in PREREQ_PM (at version 6.07) -- need to do a sane metamerge! at Makefile.PL line 159.
Use of uninitialized value in concatenation (.) or string at Makefile.PL line 162.
HTTP::Status already exists in FallbackPrereqs (at version ) -- need to do a sane metamerge! at Makefile.PL line 162.
The bug is in line 160.
warn "$module already exists in FallbackPrereqs (at version $FallbackPrereqs{$mm_key}{$module}) -- need to do a sane metamerge!"
This should be
warn "$module already exists in FallbackPrereqs (at version $FallbackPrereqs{$module}) -- need to do a sane metamerge!"
Best regards,
Bernd