From d2a990deef3a0f20bde73fdd409b75724393277b Mon Sep 17 00:00:00 2001 From: Thierry Vignaud Date: Sun, 25 Mar 2012 23:29:08 +0000 Subject: (perform_command) simplify using cat_() --- lib/Iurt/Process.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'lib/Iurt/Process.pm') diff --git a/lib/Iurt/Process.pm b/lib/Iurt/Process.pm index f0a3372..e799376 100644 --- a/lib/Iurt/Process.pm +++ b/lib/Iurt/Process.pm @@ -3,6 +3,7 @@ package Iurt::Process; use strict; use base qw(Exporter); use List::MoreUtils qw(any); +use MDK::Common qw(cat_); use Filesys::Df qw(df); use Iurt::Mail qw(sendmail); use Iurt::Config qw(dump_cache_par); @@ -260,10 +261,7 @@ sub perform_command { # Keep the run first on the harddrive so that one can check the # command status tailing it - if ($opt{log} && open my $log, $logfile) { - local $/; - $output = <$log>; - } + $output = cat_($logfile) if $opt{log}; $fulloutput .= $output; if (ref $opt{callback}) { -- cgit v1.2.1