From 5ade2047259a64c80a41bdca212e4fd6b21e9b93 Mon Sep 17 00:00:00 2001 From: Heuzef Date: Fri, 20 Sep 2019 15:39:17 +0200 Subject: [PATCH] Test capture function --- Check.pm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Check.pm b/Check.pm index 807c059..8e08043 100644 --- a/Check.pm +++ b/Check.pm @@ -22,6 +22,7 @@ package BackupPC::CGI::Check; use strict; use BackupPC::CGI::Lib qw(:all); +use IPC::System::Simple qw(system capture); sub action { @@ -129,7 +130,8 @@ sub action ($shortErr = $Status{$host}{error}) =~ s/(.{48}).*/$1.../; $shortErr = " ($shortErr)"; } - my $sizeConsistency = `check_size_consistency.pl --host=localhost`; + + my $sizeConsistency = capture($^X, "check_size_consistency.pl", "--host=localhost"); $str = <${HostLink($host)}