[libcode-tidyall-perl] 235/374: don't use capture_merged here - it ends up capturing the output from subsequent system()s that ought to be captured

Jonas Smedegaard js at alioth.debian.org
Sun Sep 29 22:26:26 UTC 2013


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libcode-tidyall-perl.

commit 1c6ba327620012017390135259744628075d341b
Author: Jonathan Swartz <swartz at pobox.com>
Date:   Fri Sep 14 12:19:06 2012 -0400

    don't use capture_merged here - it ends up capturing the output from subsequent system()s that ought to be captured
---
 lib/Code/TidyAll/t/Plugin.pm |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/lib/Code/TidyAll/t/Plugin.pm b/lib/Code/TidyAll/t/Plugin.pm
index 19e1286..f094522 100644
--- a/lib/Code/TidyAll/t/Plugin.pm
+++ b/lib/Code/TidyAll/t/Plugin.pm
@@ -1,5 +1,5 @@
 package Code::TidyAll::t::Plugin;
-use Capture::Tiny qw(capture_merged);
+use Capture::Tiny qw(capture);
 use Code::TidyAll::Util qw(tempdir_simple);
 use Code::TidyAll;
 use Test::Class::Most parent => 'Code::TidyAll::Test::Class';
@@ -33,8 +33,10 @@ sub tidyall {
 
     $source =~ s/\\n/\n/g;
     my $result;
-    my $output = capture_merged { $result = $ct->process_source( $source, $self->test_filename ) };
-    $Test->diag($output) if $ENV{TEST_VERBOSE};
+    my ( $output, $error ) =
+      capture { $result = $ct->process_source( $source, $self->test_filename ) };
+    $Test->diag($output) if $output && $ENV{TEST_VERBOSE};
+    $Test->diag($error)  if $error  && $ENV{TEST_VERBOSE};
 
     if ( my $expect_tidy = $p{expect_tidy} ) {
         $expect_tidy =~ s/\\n/\n/g;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-perl/packages/libcode-tidyall-perl.git



More information about the Pkg-perl-cvs-commits mailing list