S
Stan Brown
I'm trying to add a usage message to a script that uses Getopt::Mixed. I
want to print this message whenever a bad commnad line option is passed to
the script. I' using the module like this:
use Getopt::Mixed "nextOption" ;
Getopt::Mixed::init('F i e f=s d:i debug:i configfile=s');
my $badOption = \&print_usage;
while (($option, $value, $pretty) = nextOption()) {
if(( $option eq 'f') || ( $option eq 'configfile' ))
I just added the "print_usage" line, based upon my reading of the perldoc
page on this module, but it's not calling the print_usage() function
(which is defiend earlier in the script, when I pass it an undefined
argument (-Z for instance).
Instead, I get the following generic error mesage:
webcam.pl: unrecognized option `-Z'
What am I doing wrong here?
want to print this message whenever a bad commnad line option is passed to
the script. I' using the module like this:
use Getopt::Mixed "nextOption" ;
Getopt::Mixed::init('F i e f=s d:i debug:i configfile=s');
my $badOption = \&print_usage;
while (($option, $value, $pretty) = nextOption()) {
if(( $option eq 'f') || ( $option eq 'configfile' ))
I just added the "print_usage" line, based upon my reading of the perldoc
page on this module, but it's not calling the print_usage() function
(which is defiend earlier in the script, when I pass it an undefined
argument (-Z for instance).
Instead, I get the following generic error mesage:
webcam.pl: unrecognized option `-Z'
What am I doing wrong here?