Skip Menu |

This queue is for tickets about the Module-Metadata CPAN distribution.

Maintainer(s)' notes

Attention bug reporters: issues MUST include the version of Module::Metadata that you are running that exhibit the stated symptoms. thank you!

Report information
The Basics
Id: 89282
Status: resolved
Priority: 0/
Queue: Module-Metadata

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

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



Subject: [PATCH] no warnings in version evaluation too
[16:24] <@BinGOs> I tracked down where warnings such as: "Use of uninitialized value $Module::Metadata::_version::p1::CVSVERSION in pattern match (m//) at (eval 9) line 9, <GEN0> line 19." [16:25] <@BinGOs> were coming from (apart from Module::Metadata). [16:25] <@BinGOs> I was seeing three of these when updating my installed modules. [16:25] <@BinGOs> https://metacpan.org/source/MSCHILLI/Log-Log4perl-1.42/lib/Log/Log4perl/Appender/Limit.pm#L18 [16:27] < ilmari> is it evaling just the VERSION line? [16:27] <@BinGOs> there's two evals going on in Module::Metadata from what I can gather. [16:28] <@BinGOs> an eval to build a sub, then eval'ing that generated sub [16:43] < ilmari> no warnings; might be called for inside that eval [Editted slightly] The attached patch adds no warnings.
Subject: fooblah.diff
diff --git a/lib/Module/Metadata.pm b/lib/Module/Metadata.pm index a92d05f..60f17e8 100644 --- a/lib/Module/Metadata.pm +++ b/lib/Module/Metadata.pm @@ -654,6 +654,7 @@ sub _evaluate_version_line { #; package Module::Metadata::_version::p$pn; use version; no strict; + no warnings; \$vsub = sub { local $sigil$var;
Thanks, patch applied!
released in 1.000019.