in reply to Re: Issues w/ getOptions parsing options with pass_through enabled
in thread Issues w/ getOptions parsing options with pass_through enabled
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
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Issues w/ getOptions parsing options with pass_through enabled
by Brawny1 (Initiate) on May 24, 2006 at 15:23 UTC | |
by ikegami (Patriarch) on May 24, 2006 at 16:30 UTC | |
by Brawny1 (Initiate) on May 24, 2006 at 21:26 UTC |