Subject: | simple example with Param() fails |
The attached program fails to validate mode when called:
perl go.pl --mode test
Default 'mode' = '' fails to validate
Subject: | go.pl |
use strict;
use Getopt::Lucid qw( :all ) ;
my @specs = (
Switch("send|s"),
Param( "mode|m", qr/(test|live)/ )->required
);
my $opt = Getopt::Lucid->getopt(\@specs);
warn $opt->get_mode;