This queue is for tickets about the Net-Launchpad CPAN distribution.

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

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

BugTracker
Severity:
(no value)
Broken in:
2.101
Fixed in:
(no value)



CC: MAUKE@cpan.org
Subject: Tests fail (with Function::Parameters 2.x?)
The test suite started to fail: ... # Failed test 'Net/Launchpad.pm loaded ok' # at t/00-compile.t line 75. # got: '65280' # expected: '0' In method (anon): I was expecting a parameter list, not "{" at /tmpfs/.cpan-build-cpansand/2017042315/Net-Launchpad-2.101-0/blib/lib/Net/Launchpad.pm line 24. Compilation failed in require at -e line 1. ... (etc.) ... Statistical analysis suggests that the problem started with Function::Parameters 2.000003: **************************************************************** Regression 'mod:Function::Parameters' **************************************************************** Name Theta StdErr T-stat [0='const'] 1.0000 0.0000 125262377124245504.00 [1='eq_1.0603'] 0.0000 0.0000 6.22 [2='eq_1.0605'] 0.0000 0.0000 2.01 [3='eq_1.0701'] 0.0000 0.0000 4.19 [4='eq_1.0702'] 0.0000 0.0000 1.52 [5='eq_1.0703'] 0.0000 0.0000 2.28 [6='eq_1.0704'] 0.0000 0.0000 6.02 [7='eq_1.0705'] 0.0000 0.0000 10.54 [8='eq_2.000003'] -1.0000 0.0000 -27334491661998096.00 [9='eq_2.000006'] -1.0000 0.0000 -78620419237686656.00 R^2= 1.000, N= 90, K= 10 ****************************************************************
On Sun Apr 23 15:42:40 2017, SREZIC wrote:
Show quoted text
> The test suite started to fail: > > ... > # Failed test 'Net/Launchpad.pm loaded ok' > # at t/00-compile.t line 75. > # got: '65280' > # expected: '0' > In method (anon): I was expecting a parameter list, not "{" at > /tmpfs/.cpan-build-cpansand/2017042315/Net-Launchpad-2.101- > 0/blib/lib/Net/Launchpad.pm line 24. > Compilation failed in require at -e line 1. > ... (etc.) ... > > Statistical analysis suggests that the problem started with > Function::Parameters 2.000003: > > **************************************************************** > Regression 'mod:Function::Parameters' > **************************************************************** > Name Theta StdErr T-stat > [0='const'] 1.0000 0.0000 125262377124245504.00 > [1='eq_1.0603'] 0.0000 0.0000 6.22 > [2='eq_1.0605'] 0.0000 0.0000 2.01 > [3='eq_1.0701'] 0.0000 0.0000 4.19 > [4='eq_1.0702'] 0.0000 0.0000 1.52 > [5='eq_1.0703'] 0.0000 0.0000 2.28 > [6='eq_1.0704'] 0.0000 0.0000 6.02 > [7='eq_1.0705'] 0.0000 0.0000 10.54 > [8='eq_2.000003'] -1.0000 0.0000 > -27334491661998096.00 > [9='eq_2.000006'] -1.0000 0.0000 > -78620419237686656.00 > > R^2= 1.000, N= 90, K= 10 > ****************************************************************
There are two problems: 1. Methods without parameter lists. It looks like they're meant to take no arguments, so adding "()" should work (and be compatible with F:P 1): # untested find lib -name '*.pm' -type f -exec perl -i -pe 's/\bmethod\s*\{/method () {/; s/\bmethod\s+(\w+)\s*\{/method $1 () {/' '{}' ';' 2. Undefined types (e.g. Str, Int, ...). This is a bit harder to solve because you have to decide how. There are a couple of ways: - Add 'use MooseX::Types::Moose qw(Str Int HashRef);' to those modules. This adds a new dependency (MooseX::Types) but should be compatible with F:P 1 and F:P 2. - Replace 'use Function::Parameters' by 'use Function::Parameters { method => { defaults => 'method', reify_type => 'moose' } }'. This keeps the old functionality but requires at least version 2 of F:P. (So maybe it should be 'use Function::Parameters 2 { method => { defaults => 'method', reify_type => 'moose' } }' to make it explicit.) - Replace 'use Function::Parameters' by 'use Function::Parameters { method => { defaults => 'method', reify_type => sub { require Moose::Util::TypeConstraints; Moose::Util::TypeConstraints::find_or_create_isa_type_constraint($_[0]) } } };'. This should be compatible with F:P back to version 1.4 or thereabouts, but looks really ugly.


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.