aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Iurt/Process.pm
diff options
context:
space:
mode:
authorThierry Vignaud <tv@mageia.org>2012-03-25 23:29:08 +0000
committerThierry Vignaud <tv@mageia.org>2012-03-25 23:29:08 +0000
commitd2a990deef3a0f20bde73fdd409b75724393277b (patch)
tree45b78f78e877394b255f570df52c604006d5f024 /lib/Iurt/Process.pm
parentbb2438131ef00a7e255c893794f5073b629ae0ac (diff)
downloadiurt-d2a990deef3a0f20bde73fdd409b75724393277b.tar
iurt-d2a990deef3a0f20bde73fdd409b75724393277b.tar.gz
iurt-d2a990deef3a0f20bde73fdd409b75724393277b.tar.bz2
iurt-d2a990deef3a0f20bde73fdd409b75724393277b.tar.xz
iurt-d2a990deef3a0f20bde73fdd409b75724393277b.zip
(perform_command) simplify using cat_()
Diffstat (limited to 'lib/Iurt/Process.pm')
-rw-r--r--lib/Iurt/Process.pm6
1 files changed, 2 insertions, 4 deletions
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}) {