Re: [Perlunit-users] Test-Unit on Win32: OutputDebugString at 'assert' failure time?
Status: Beta
Brought to you by:
mca1001
|
From: Phlip <pl...@sy...> - 2002-11-08 19:06:34
|
> If you're using Perl 5.6 or greater, the warnings pragma can help:
>
> use Test::Unit::Debug;
>
> {
> no warnings 'redefine';
> Test::Unit::Debug::debug = sub { ... };
> }
I thought that needed a star:
use Test::Unit::Debug;
{
no warnings 'redefine';
package Test::Unit::Debug;
*Test::Unit::Debug::debug = sub {
my ($package, $filename, $line) = caller();
print $out "***************************************that's the
facts, Jack!\n";
print $out @_ if $DEBUG{$package};
}
}
Several variations on that produce this:
Variable "%DEBUG" is not imported at c:../ProgrammerTests/SystranTP.pm line
24.
BEGIN not safe after errors--compilation aborted at
c:../ProgrammerTests/Systran
TP.pm line 369.
--
Phlip
http://www.greencheese.org/HatTrick
|