Subject: | Tests failing on most perls |
The matrix of the fail behaviour of your module made me curious
http://bbbike2.radzeit.de/~slaven/cpantestersmatrix.cgi?dist=Devel-Messenger;maxver=0
I quickly hacked a patch that made the test succeed:
diff -urp Devel-Messenger-0.01-0lQts8/t/note.t
Devel-Messenger-0.01-YaOPnk/t/note.t
--- Devel-Messenger-0.01-0lQts8/t/note.t 2001-06-02
17:28:08.000000000 +0200
+++ Devel-Messenger-0.01-YaOPnk/t/note.t 2008-02-09
13:41:11.000000000 +0100
@@ -22,7 +22,7 @@ print "ok 1\n";
local *note = note { output => 'print' };
note "ok 2\n";
-# test warn
+no warnings 'redefine'; # test warn
local *note = note { output => 'warn' };
{
my $message = '';
@@ -33,7 +33,7 @@ local *note = note { output => 'warn' };
}
# test filename
-my $file = 'debug.txt';
+my $file = 'debug.txt'; unlink $file; # may fail
local *note = note { output => $file };
my @data = <DATA>;
note @data;
BTW, it's important to keep the changes without changing line count
because some tests verify their position within the test file.
So to explain what went wrong: the warning about subroutine XXX being
redefined broke test 26. The fact that 'debug.txt' was never removed
broke test 4.
And why did some perls deliver PASS? Because the repetition of the idiom
local *foo = sub { ... };
started to warn sometime in the 5.7.1 development cycle.
HTH,