Ah,
My lack of sufficient research has led me astray. The App::Control
module does exactly what I want. At least I can say my programming
wasn't all for not, I learned some good programming techniques from the
folks at perlmonks.org.
Thanks
Travis
Johan Vromans wrote:
> Hi Travis,
>
> > 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.
>
> AFAIK, the SystemV init scripts take one argument, that may be the
> keyword "start" or "stop", sometimes keywords like "restart" or
> "reload". This would lead to simple programming like
>
> if ( $ARGV[0] eq "start" ) {
> print "I'm supposed to start something\n";
> }
> elsif ( $ARGV[0] eq "stop" ) {
> print "I'm supposed to stop something\n";
> }
> else {
> print "usage: thisprogram [ start | stop ]\n";
> }
>
> Unless I'm overlooking something I fail to se the added benefit of
> having a module for this purpose.
>
> In any case, Getopt:: is not a good name prefix since you're not
> dealing with program options in the Unix sense of the word.
>
> Have you looked at the App::Control module?
>
> -- Johan