[libcode-tidyall-perl] 362/374: fix for no more --release flag

Jonas Smedegaard js at alioth.debian.org
Sun Sep 29 22:26:52 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 14d5038da2957b87eaf971f2d200b46008eb59c4
Author: Jonathan Swartz <swartz at pobox.com>
Date:   Sat Sep 21 12:14:28 2013 -0700

    fix for no more --release flag
---
 lib/Code/TidyAll/Plugin/JSBeautify.pm |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/lib/Code/TidyAll/Plugin/JSBeautify.pm b/lib/Code/TidyAll/Plugin/JSBeautify.pm
index f3ff59a..51698b0 100644
--- a/lib/Code/TidyAll/Plugin/JSBeautify.pm
+++ b/lib/Code/TidyAll/Plugin/JSBeautify.pm
@@ -1,5 +1,6 @@
 package Code::TidyAll::Plugin::JSBeautify;
-use IPC::System::Simple qw(run);
+use Capture::Tiny qw(capture_merged);
+use Code::TidyAll::Util qw(write_file);
 use Moo;
 use Try::Tiny;
 extends 'Code::TidyAll::Plugin';
@@ -10,7 +11,9 @@ sub transform_file {
     my ( $self, $file ) = @_;
 
     try {
-        run( sprintf( "%s --replace %s %s", $self->cmd, $self->argv, $file ) );
+        my $cmd = join( " ", $self->cmd, $self->argv, $file );
+        my $output = capture_merged { system($cmd) };
+        write_file( $file, $output );
     }
     catch {
         die sprintf( "%s exited with error - possibly bad arg list '%s'", $self->cmd, $self->argv );

-- 
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