1Sys::VirtConvert::ExecHUesleprerC(o3n)tributed Perl DocuSmyesn:t:aVtiirotnConvert::ExecHelper(3)
2
3
4

NAME

6       Sys::VirtConvert::ExecHelper - Execute a command with output
7       suppression
8

SYNOPSIS

10        use Sys::VirtConvert::ExecHelper;
11
12        $eh = Sys::VirtConvert::ExecHelper->run('rpm', '-V', 'bash');
13
14        if($eh->status() != 0) {
15            warn $eh->output();
16        }
17

DESCRIPTION

19       Sys::VirtConvert::ExecHelper is a substitute for system() when you
20       don't want any command output. Sys::VirtConvert::ExecHelper does,
21       however, make STDOUT and STDERR available in a combined stream if it is
22       required, for example because the executed command failed.
23

METHODS

25       run(@command)
26           Run @command, which is an array containing the command and its
27           arguments.
28
29           The command will be executed immediately. ExecHelper will block
30           until the command exits.
31
32       status
33           Return the exit status of the executed command.
34
35       output
36           Return the combined stdout and stderr of the command.
37
38           WARNING: This command puts the output in a string in memory. Don't
39           use this if the output could be large.
40
42       Copyright (C) 2009 Red Hat Inc.
43

LICENSE

45       Please see the file COPYING.LIB for the full license.
46

SEE ALSO

48       virt-v2v(1), <http://libguestfs.org/>.
49
50
51
52perl v5.10.1                      2013-12-03   Sys::VirtConvert::ExecHelper(3)
Impressum