This queue is for tickets about the Keyword-Value CPAN distribution.

Report information
The Basics
Id:
122185
Status:
open
Priority:
Low/Low
Queue:

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

BugTracker
Severity:
(no value)
Broken in:
v0.1.1
Fixed in:
(no value)



CC: DCONWAY@cpan.org
Subject: Test suite started to fail (with newest Keyword::Declare?)
Another one failing with Keyword::Declare >= 0.001000: ... Global symbol "$i" requires explicit package name (did you forget to declare "my $i"?) at t/30-value-var-expr.t line 9. Global symbol "$j" requires explicit package name (did you forget to declare "my $j"?) at t/30-value-var-expr.t line 10. Global symbol "$k" requires explicit package name (did you forget to declare "my $k"?) at t/30-value-var-expr.t line 11. ... (snip) ... Global symbol "$k" requires explicit package name (did you forget to declare "my $k"?) at t/30-value-var-expr.t line 108. Global symbol "$k" requires explicit package name (did you forget to declare "my $k"?) at t/30-value-var-expr.t line 116. Global symbol "$k" requires explicit package name (did you forget to declare "my $k"?) at t/30-value-var-expr.t line 124. Execution of t/30-value-var-expr.t aborted due to compilation errors. t/30-value-var-expr.t ........ Dubious, test returned 255 (wstat 65280, 0xff00) No subtests run Statistical analysis: **************************************************************** Regression 'mod:Keyword::Declare' **************************************************************** Name Theta StdErr T-stat [0='const'] 1.0000 0.0000 10952079497216934.00 [1='eq_0.000005'] -0.0000 0.0000 -2.38 [2='eq_0.001000'] -1.0000 0.0000 -10244732287824292.00 [3='eq_0.001002'] -1.0000 0.0000 -10417505553163022.00 R^2= 1.000, N= 84, K= 4 ****************************************************************
Subject: Re: [rt.cpan.org #122185] Test suite started to fail (with newest Keyword::Declare?)
Date: Fri, 23 Jun 2017 05:45:02 -0400
To: bug-Keyword-Value@rt.cpan.org
From: Damian Conway <damian@conway.org>
The module is subtly assuming that Keyword::Declare uses PPI
to extract keyword arguments.

The fix is to change the first declaration of keyword value to:

    keyword value( Var $var, '=', Expr $expr ) 
    {                                          
        ( 0 > index "$var", '::' )             
        ? "\$Keyword::Value::const->( my $var = $expr )"
        : "\$Keyword::Value::const->(    $var = $expr )"
    }


Damian


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

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.