> 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




-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm 
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
_______________________________________________
Perlunit-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/perlunit-users

Reply via email to