MIO::CMD - Run multiple commands in parallel.
use MIO::CMD; my @node = qw( host1 host2 ... ); my @cmd = qw( ssh {} wc ); my $cmd = MIO::CMD->new( map { $_ => \@cmd } @node ); my $result = $cmd->run( max => 32, log => \*STDERR, timeout => 300 ); my $stdout = $result->{stdout}; my $stderr = $result->{stderr}; my $error = $result->{error};
Run commands in parallel. The following parameters may be defined in %param:
max : ( default 128 ) number of commands in parallel. log : ( default STDERR ) a handle to report progress. timeout : ( default 300 ) number of seconds allotted for each command. input : ( default from STDIN ) input buffer.
Returns HASH of HASH of nodes. First level is indexed by type ( stdout, stderr, or error ). Second level is indexed by message.
To install pantheon, copy and paste the appropriate command in to your terminal.
cpanm
cpanm pantheon
CPAN shell
perl -MCPAN -e shell install pantheon
For more information on module installation, please visit the detailed CPAN module installation guide.