Hello,
I have written a module for my personal use and was wondering if it
might be of use for others. The module is currently called
Getopt::SysVInit (Is that a poor choice of name? Suggestions
appreciated). It provides a mechanism for reading a single key word
option from the command line just as the scripts found in the init.d
directory do on most UNIX. My need for this module arose from the need
of a control program for daemons I've written. The apachectl program
actually gave me the idea for the module. Here is how the module
works:
use Getopt::SysVInit;
$goa = Getopt::SysVInit->new(qw(blah stuff));
$success = $goa->getopt;
if(!$success){
print "usage: thisprogram option\n";
print "Available options are:\n";
for ($goa->options){
print "$_\n";
}
}
if($goa->start){
print "I'm supposed to start something\n";
}
if($goa->stop){
print "I'm supposed to stop something\n";
}
....
....
I would appreciate hearing if other module authors think this might be
useful addition to cpan (or maybe to another Getopt module in order not
to clutter cpan?)
Thanks
Travis