Skip Menu |

This queue is for tickets about the Function-Parameters CPAN distribution.

Report information
The Basics
Id: 99100
Status: resolved
Priority: 0/
Queue: Function-Parameters

People
Owner: Nobody in particular
Requestors: 'spro^^*%*^6ut# [...] &$%*c
Cc:
AdminCc:

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



Subject: [PATCH] Fix for 5.21.4
See the attached patch. I don’t know how to avoid lastsib manipulation using the current API, which suggests the API is lacking; but I don’t actually use the API myself, so I’m not sure what to suggest.
Subject: open_NJz00daW.txt
diff -rup Function-Parameters-1.0402-gwmK_J-orig/Parameters.xs Function-Parameters-1.0402-gwmK_J/Parameters.xs --- Function-Parameters-1.0402-gwmK_J-orig/Parameters.xs 2014-09-01 12:27:03.000000000 -0700 +++ Function-Parameters-1.0402-gwmK_J/Parameters.xs 2014-09-23 22:20:48.000000000 -0700 @@ -1790,6 +1790,10 @@ static int parse_fun(pTHX_ Sentinel sen, keys = newLISTOP(OP_JOIN, 0, first, mid); keys->op_targ = pad_alloc(OP_JOIN, SVs_PADTMP); ((LISTOP *)keys)->op_last = last; +#if HAVE_PERL_VERSION(5, 21, 2) + mid->op_lastsib = 0; + last->op_lastsib = 1; +#endif } msg = mkconstsv(aTHX_ newSVpvf("In %"SVf": no such named parameter: ", SVfARG(declarator))); diff -rup Function-Parameters-1.0402-gwmK_J-orig/padop_on_crack.c.inc Function-Parameters-1.0402-gwmK_J/padop_on_crack.c.inc --- Function-Parameters-1.0402-gwmK_J-orig/padop_on_crack.c.inc 2014-09-23 21:36:00.000000000 -0700 +++ Function-Parameters-1.0402-gwmK_J/padop_on_crack.c.inc 2014-09-23 21:36:10.000000000 -0700 @@ -490,7 +490,10 @@ func_ops: kid = cLOGOPo->op_first; if (kid->op_type == OP_NOT && (kid->op_flags & OPf_KIDS) - && !PL_madskills) { +#ifdef PL_madskills + && !PL_madskills +#endif + ) { if (o->op_type == OP_AND) { o->op_type = OP_OR; o->op_ppaddr = PL_ppaddr[OP_OR]; diff -rup Function-Parameters-1.0402-gwmK_J-orig/t/eating_strict_error.t Function-Parameters-1.0402-gwmK_J/t/eating_strict_error.t --- Function-Parameters-1.0402-gwmK_J-orig/t/eating_strict_error.t 2014-08-31 07:57:38.000000000 -0700 +++ Function-Parameters-1.0402-gwmK_J/t/eating_strict_error.t 2014-09-23 21:46:37.000000000 -0700 @@ -15,7 +15,9 @@ for my $thing (map [__DIR__ . "/eating_s my $err = $!; is $done, undef, "faulty code doesn't load"; - my $msg = qq{Global symbol "\$records" requires explicit package name at $file line $line.\n}; - like $exc, qr{^\Q$msg}; + my $msg = qq{Global symbol "\$records" requires explicit package } + .qq{name(?: \([^)]+\))? at $file line $line.\n}; + like $exc, qr{^Global symbol "\$records" requires explicit (?x: + )package name(?: \([^)]+\))? at $file line $line.\n}; $exc or die "$file: $err"; } diff -rup Function-Parameters-1.0402-gwmK_J-orig/t/foreign/MooseX-Method-Signatures/errors.t Function-Parameters-1.0402-gwmK_J/t/foreign/MooseX-Method-Signatures/errors.t --- Function-Parameters-1.0402-gwmK_J-orig/t/foreign/MooseX-Method-Signatures/errors.t 2014-08-31 07:57:38.000000000 -0700 +++ Function-Parameters-1.0402-gwmK_J/t/foreign/MooseX-Method-Signatures/errors.t 2014-09-23 21:37:27.000000000 -0700 @@ -15,7 +15,7 @@ ok($@, "Got an error"); # if Eval::Closure->VERSION > 0.06; like($@, - qr/^Global symbol "\$op" requires explicit package name at .*?\bInvalidCase01.pm line 8\b/, + qr/^Global symbol "\$op" requires explicit package name .*?\bInvalidCase01.pm line 8\b/, "Sane error message for syntax error"); #}
On Wed Sep 24 01:23:56 2014, SPROUT wrote: Show quoted text
> See the attached patch. > > I don’t know how to avoid lastsib manipulation using the current API, > which suggests the API is lacking; but I don’t actually use the API > myself, so I’m not sure what to suggest.
Thanks! I've applied your patch (or at least similar code) to the development repository. (I've also refactored the code stolen from the perl core so it's a bit easier to see which functions Parameters.xs relies on.)