package Getopt::Long;
-# RCS Status : $Id: GetoptLong.pm,v 2.45 2001-09-27 17:39:47+02 jv Exp $
+# RCS Status : $Id: GetoptLong.pm,v 2.47 2001-11-15 18:14:22+01 jv Exp $
# Author : Johan Vromans
# Created On : Tue Sep 11 15:00:12 1990
# Last Modified By: Johan Vromans
-# Last Modified On: Thu Sep 27 17:38:47 2001
-# Update Count : 980
+# Last Modified On: Thu Nov 15 18:13:36 2001
+# Update Count : 987
# Status : Released
################ Copyright ################
use strict;
use vars qw($VERSION);
-$VERSION = 2.26_02;
+$VERSION = 2.26_03;
# For testing versions only.
use vars qw($VERSION_STRING);
-$VERSION_STRING = "2.26_02";
+$VERSION_STRING = "2.26_03";
use Exporter;
$error = '';
print STDERR ("GetOpt::Long $Getopt::Long::VERSION (",
- '$Revision: 2.45 $', ") ",
+ '$Revision: 2.47 $', ") ",
"called from package \"$pkg\".",
"\n ",
"ARGV: (@ARGV)",
if ( $bundling && $starter eq '-' ) {
- # To try overides, obey case ignore.
+ # To try overrides, obey case ignore.
$tryopt = $ignorecase ? lc($opt) : $opt;
# If bundling == 2, long options can override bundles.
- if ( $bundling == 2 && defined ($opctl->{$tryopt}) ) {
+ if ( $bundling == 2 && length($tryopt) > 1
+ && defined ($opctl->{$tryopt}) ) {
print STDERR ("=> $starter$tryopt overrides unbundling\n")
if $debug;
}
my $mand = $ctl->[CTL_MAND];
# Check if there is an option argument available.
- if ( $gnu_compat ) {
- return (1, $opt, $ctl, $optarg)
- if defined $optarg;
- return (1, $opt, $ctl, $type eq "s" ? '' : 0)
- unless $mand;
+ if ( $gnu_compat && defined $optarg && $optarg eq "" ) {
+ return (1, $opt, $ctl, $type eq "s" ? "" : 0) unless $mand;
+ $optarg = 0 unless $type eq "s";
}
# Check if there is an option argument available.