Even so if you change lib=s to lib=f and then use the following command it still does not complain (and error out since lib should be a float)
It's not an error because of pass_through. It causes anything wrong to left in @ARGV for further processing. For example,
use Getopt::Long (); our $opt_float; Getopt::Long::Configure('no_auto_abbrev','pass_through'); Getopt::Long::GetOptions('float=f') or die("Bad args\n"); print("\$opt_float = ", defined($opt_float) ? $opt_float : "[undef]", +"\n"); print("\@ARGV = ", join(' ', @ARGV), "\n");
returns
>perl 551380.pl -float 1.3 $opt_float = 1.3 @ARGV = >perl 551380.pl -float abc $opt_float = [undef] @ARGV = -float abc
In reply to Re^2: Issues w/ getOptions parsing options with pass_through enabled
by ikegami
in thread Issues w/ getOptions parsing options with pass_through enabled
by Brawny1
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |