Skip Menu |

This queue is for tickets about the Math-Permute-Array CPAN distribution.

Report information
The Basics
Id: 103041
Status: open
Priority: 0/
Queue: Math-Permute-Array

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

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



Subject: Test suite fails since perl 5.21.7
The t3.t fails with 5.21.7 and newer: Type of arg 1 to Math::Permute::Array::Apply_on_perms must be block or sub {} (not undef operator) at t/t3.t line 29, near "@array)" Type of arg 1 to Math::Permute::Array::Apply_on_perms must be block or sub {} (not reference constructor) at t/t3.t line 32, near "undef;" Type of arg 1 to Math::Permute::Array::Apply_on_perms must be block or sub {} (not undef operator) at t/t3.t line 35, near "undef)" Execution of t/t3.t aborted due to compilation errors. # Looks like your test exited with 255 just after 1. t/t3.t ............ Dubious, test returned 255 (wstat 65280, 0xff00) All 1 subtests passed
On Mon Mar 23 17:36:39 2015, SREZIC wrote: Show quoted text
> The t3.t fails with 5.21.7 and newer: > > Type of arg 1 to Math::Permute::Array::Apply_on_perms must be block or > sub {} (not undef operator) at t/t3.t line 29, near "@array)" > Type of arg 1 to Math::Permute::Array::Apply_on_perms must be block or > sub {} (not reference constructor) at t/t3.t line 32, near "undef;" > Type of arg 1 to Math::Permute::Array::Apply_on_perms must be block or > sub {} (not undef operator) at t/t3.t line 35, near "undef)" > Execution of t/t3.t aborted due to compilation errors. > # Looks like your test exited with 255 just after 1. > t/t3.t ............ > Dubious, test returned 255 (wstat 65280, 0xff00) > All 1 subtests passed
It was a bug that the & prototype allowed ‘undef’ as an argument. The attached patch changes the test to use a &-style call to bypass the prototype.
Subject: open_SxZiycLz.txt
diff -rup Math-Permute-Array-0.043-dD9xJ_-orig/t/t3.t Math-Permute-Array-0.043-dD9xJ_/t/t3.t --- Math-Permute-Array-0.043-dD9xJ_-orig/t/t3.t 2015-03-25 00:02:27.000000000 -0700 +++ Math-Permute-Array-0.043-dD9xJ_/t/t3.t 2015-03-25 00:02:38.000000000 -0700 @@ -26,13 +26,13 @@ my $err; $err = $p->permutation(undef); exit(-1) if(defined $err); -$err = Math::Permute::Array::Apply_on_perms(undef,\@array); +$err = &Math::Permute::Array::Apply_on_perms(undef,\@array); exit(-2) if(defined $err); $err = Math::Permute::Array::Apply_on_perms { } undef; exit(-3) if(defined $err); -$err = Math::Permute::Array::Apply_on_perms(undef,undef); +$err = &Math::Permute::Array::Apply_on_perms(undef,undef); exit(-4) if(defined $err); $err = Math::Permute::Array::Permute(undef,undef);