apply patch from RT#76523 - remove use of internal Test::Builder functions
[gitmo/MooseX-Daemonize.git] / lib / Test / MooseX / Daemonize.pm
index b45245b..9348996 100644 (file)
@@ -1,7 +1,7 @@
 package Test::MooseX::Daemonize;
 use strict;
 
-our $VERSION   = '0.10';
+our $VERSION   = '0.15';
 our $AUTHORITY = 'cpan:PERIGRIN';
 
 # BEGIN CARGO CULTING
@@ -52,15 +52,16 @@ sub check_test_output {
 
            # We don't just call ok(!$not), because that generates diagnostics of
            # its own for failures. We only want the diagnostics from the child.
-            my $num = $Test->current_test;
-            $Test->current_test( ++$num );
-            $Test->_print("$status $num - $text\n");
+            my $orig_no_diag = $Test->no_diag;
+            $Test->no_diag(1);
+            $Test->ok(!$not, $text);
+            $Test->no_diag($orig_no_diag);
         }
         elsif ( $line =~ s/\A#\s?// ) {
             $Test->diag($line);
         }
         else {
-            $Test->_print_diag("$label: $line (unrecognised)\n");
+            $Test->diag("$label: $line (unrecognised)\n");
         }
     }
 }
@@ -165,7 +166,7 @@ Chris Prather  C<< <perigrin@cpan.org> >>
 
 =head1 LICENCE AND COPYRIGHT
 
-Copyright (c) 2007-2010, Chris Prather C<< <perigrin@cpan.org> >>. All rights reserved.
+Copyright (c) 2007-2011, Chris Prather C<< <perigrin@cpan.org> >>. All rights reserved.
 
 This module is free software; you can redistribute it and/or
 modify it under the same terms as Perl itself. See L<perlartistic>.