NAME
App::Myinst - Implements very limited features of a legendary command-line tool at an iconic internet company.
VERSION
Version 0.02
SYNOPSIS
The user of this module is expected to create a small driver script like this:
$ vi myinst.pl
#!/usr/bin/perl
use strict;
use warnings;
use App::Myinst;
App::Myinst->run();
and run with options.
Usage: ./myinst.pl <command> -h host1,host2 -j 4 "<remote_command>" Implements very limited features of a legendary command-line tool at an iconic internet company.
<command> command to myinst. currently, only "ssh" is supported
-h hostname, can be a comma-separated list
-H specify a file with hostnames in it
-j number of jobs to execute in parallel. default: 1
-f flag to save output in a file per host. default: cwd
-dir if -f is specified, you may specify the output directory
-d debug mode
<remote_command> the command to run on the remote hosts
Note on testing: This module wraps around ssh and as such, requires authentication. I have included an interactive test_deeply.pl script for those interested in testing.
SUBROUTINES/METHODS
new
Description: The constructor. Creates object then calls init().
Arguments: none
Returns: the object
init
Description: Arg parser. Initializes defaults, then parses options.
Arguments: none
Returns: none
run
Description: The driver method. Determines the next action based on the options passed in.
Arguments: none
Returns: none
run_ssh
Description: Do the ssh command business.
Arguments: none
Returns: none, but can croak on errors
build_hosts
Description: Parses options, open files (if needed) and returns hostlist
Arguments: none (object should have everything)
Returns: array of hosts
usage
Description: Prints usage and exits.
Arguments: none
Returns: none
AUTHOR
Satoshi Yagi, <satoshi.yagi at yahoo.com>
BUGS
Please report any bugs or feature requests to bug-app-myinst at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=App-Myinst. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc App::Myinst
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2012 Satoshi Yagi.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.