Skip to content

Instantly share code, notes, and snippets.

@preaction
Last active April 9, 2016 18:42
Show Gist options
  • Save preaction/c5dcebb3d4ad28b33acb409eb51d31df to your computer and use it in GitHub Desktop.
Save preaction/c5dcebb3d4ad28b33acb409eb51d31df to your computer and use it in GitHub Desktop.
=head2 run( @args, $opts )
my $exit = $cmd->run( @args, $opts );
my ( $output, $exit ) = $cmd->run( @args, $opts );
Run the command with with given C<@args> and C<$opts>. C<@args>
are the positional arguments to give to the command. C<$opts>
is a hash reference of options. Possible options are:
=over
=item user
The user name to use to authenticate
=item password
The password to use to authenticate
=item host
The host to run against
=back
In scalar context, returns the exit code of the command, throwing
away the command output. In list context, returns the output and
exit code.
=cut
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment