This queue is for tickets about the Test-Unit CPAN distribution.

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

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

BugTracker
Severity:
(no value)
Broken in:
  • 0.25
  • 0.25_1325
Fixed in:
(no value)



Subject: Can't use 'defined(@array)'
With newest perls this is now a hard error, not a warning anymore: PERL_DL_NONLAZY=1 "/bbbike/perl-5.21.9/bin/perl5.21.9" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/*.t Can't use 'defined(@array)' (Maybe you should just omit the defined()?) at /tmpfs/.cpan-build/Test-Unit-0.25-ABxy7S/blib/lib/Test/Unit/TestCase.pm line 106. Compilation failed in require at /tmpfs/.cpan-build/Test-Unit-0.25-ABxy7S/blib/lib/Test/Unit/TestSuite.pm line 15. ...
Line 106 of TestCase.pm needs to be changed to this: if (@{"$class\::TESTS"}) { This should be a very quick fix and will probably eliminate a large number of test failures. Currently this blocks the installation of another module I'd like to use. Matthew, do you have time to do a release of this?
On Thu May 28 03:31:10 2015, NGLENN wrote:
Show quoted text
> Line 106 of TestCase.pm needs to be changed to this: > > if (@{"$class\::TESTS"}) { > > This should be a very quick fix and will probably eliminate a large > number of test failures. Currently this blocks the installation of > another module I'd like to use. > > Matthew, do you have time to do a release of this?
I am attaching that correction in patch form (drawn against the 2011 dev release). MCAST, if you can apply it and issue a new CPAN release, it will bring Test-Unit into perl-5.26.0-readiness. If you are unable to continue to maintain this distribution, could you designate a COMAINT? Thank you very much. Jim Keenan
Subject: Test-Unit.20170403.diff
--- ./lib/Test/Unit/TestCase.pm.orig 2017-04-03 12:55:34.085383089 -0400 +++ ./lib/Test/Unit/TestCase.pm 2017-04-03 12:56:27.162086875 -0400 @@ -106,7 +106,7 @@ my $class = ref($_[0]) || $_[0]; my @tests = (); no strict 'refs'; - if (defined(@{"$class\::TESTS"})) { + if (@{"$class\::TESTS"}) { push @tests, @{"$class\::TESTS"}; } else {
Today I pinged the (co-)maintainers aspiers@cpan.org, mcast@cpan.org (and clemburg@cpan.org, but that one bounced) to roll out a new release containing JKEENAN's fix. My copy of that fix is at GitHub (https://github.com/domq/Test-Unit). To test it out: 1. git clone https://github.com/domq/Test-Unit.git 2. perl -i -pe 's/\.git/\.gitz/' inc/GetVersion.pm 3. perl Makefile.PL && make test


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.