http://qs321.pair.com?node_id=964273


in reply to Net::OpenSSH::Parallel documentation

The Error Handling section gives some pretty good pointers. For instance, you may want to specify on_error in one of the following ways:

useNet::OpenSSH::Parallel::Constants qw(:error :on_error);
# with a coderef $pssh->add_host($host, user =>'root', passwd=>'access', on_error=> sub { my ($pssh, $label, $error, $task) = @_; $error == OSSH_JOIN_FAILED and do { ... }; $error == OSSH_ABORTED and do { ... }; $error == OSSH_GOTO_FAILED and do { ... }; }, ); # or with constants $pssh->add_host($label, on_error => OSSH_ON_ERROR_IGNORE); $pssh->add_host($label, on_error => OSSH_ON_ERROR_ABORT_ALL);