Sys::VirtConvert::ExecUsereContributed Perl DocSys::VirtConvert::ExecHelper(3)NAMESys::VirtConvert::ExecHelper - Execute a command with output
suppression
SYNOPSIS
use Sys::VirtConvert::ExecHelper;
$eh = Sys::VirtConvert::ExecHelper->run('rpm', '-V', 'bash');
if($eh->status() != 0) {
warn $eh->output();
}
DESCRIPTIONSys::VirtConvert::ExecHelper is a substitute for system() when you
don't want any command output. Sys::VirtConvert::ExecHelper does,
however, make STDOUT and STDERR available in a combined stream if it is
required, for example because the executed command failed.
METHODS
run(@command)
Run @command, which is an array containing the command and its
arguments.
The command will be executed immediately. ExecHelper will block
until the command exits.
status
Return the exit status of the executed command.
output
Return the combined stdout and stderr of the command.
WARNING: This command puts the output in a string in memory. Don't
use this if the output could be large.
COPYRIGHT
Copyright (C) 2009 Red Hat Inc.
LICENSE
Please see the file COPYING.LIB for the full license.
SEE ALSOvirt-v2v(1), <http://libguestfs.org/>.
perl v5.10.1 2013-11-21 Sys::VirtConvert::ExecHelper(3)