Subject: | "no_getopt_compat" does not work |
From the documentation to Getopt::Long (v 2.34):
getopt_compat
Allow "+" to start options. Default is
enabled unless environment variable
POSIXLY_CORRECT has been set, in which case
"getopt_compat" is disabled.
However, neither using "no_getopt_compat" nor setting the
environment variable to a true value seems to work; GetOptions()
still considers arguments beginning with a plus sign as options:
$ perl -MGetopt::Long -MGetopt::Long -le 'print Getopt::Long->VERSION; Getopt::Long::Configure "no_getopt_compat"; $ENV{POSIXLY_CORRECT} = 1; GetOptions foo=>\$bar; print "@ARGV"' +test one two three
2.34
Unknown option: test
one two three
I've tested it with Perl 5.6.0 and 5.8.5.
Regards,
fany