diff options
author | Steve Peters <steve@fisharerojo.org> | 2007-10-02 13:56:07 +0000 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2007-10-02 13:56:07 +0000 |
commit | 4c56f2471f550a189d8c7c4bc89aee7346571b44 (patch) | |
tree | 1eff872b28f6fc9f0c299df5d27d7ed11e42910a /lib/Getopt | |
parent | 547d3dfd0918e1335aa86e352904fbb22cccfb6d (diff) | |
download | perl-4c56f2471f550a189d8c7c4bc89aee7346571b44.tar.gz |
Upgrade to Getopt-Long-2.37
p4raw-id: //depot/perl@32009
Diffstat (limited to 'lib/Getopt')
-rw-r--r-- | lib/Getopt/Long.pm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/lib/Getopt/Long.pm b/lib/Getopt/Long.pm index 77a86add3c..f44e615a5b 100644 --- a/lib/Getopt/Long.pm +++ b/lib/Getopt/Long.pm @@ -2,12 +2,12 @@ package Getopt::Long; -# RCS Status : $Id: Long.pm,v 2.73 2007/01/27 20:00:34 jv Exp $ +# RCS Status : $Id: Long.pm,v 2.74 2007/09/29 13:40:13 jv Exp $ # Author : Johan Vromans # Created On : Tue Sep 11 15:00:12 1990 # Last Modified By: Johan Vromans -# Last Modified On: Sat Jan 27 20:59:00 2007 -# Update Count : 1552 +# Last Modified On: Sat Sep 29 15:38:55 2007 +# Update Count : 1571 # Status : Released ################ Copyright ################ @@ -35,10 +35,10 @@ use 5.004; use strict; use vars qw($VERSION); -$VERSION = 2.36; +$VERSION = 2.37; # For testing versions only. use vars qw($VERSION_STRING); -$VERSION_STRING = "2.36"; +$VERSION_STRING = "2.37"; use Exporter; use vars qw(@ISA @EXPORT @EXPORT_OK); @@ -305,7 +305,7 @@ sub GetOptionsFromArray($@) { local ($^W) = 0; print STDERR ("Getopt::Long $Getopt::Long::VERSION (", - '$Revision: 2.73 $', ") ", + '$Revision: 2.74 $', ") ", "called from package \"$pkg\".", "\n ", "argv: (@$argv)", @@ -1055,7 +1055,7 @@ sub FindOption ($$$$$) { # Check if there is an option argument available. if ( $gnu_compat && defined $optarg && $optarg eq '' ) { - return (1, $opt, $ctl, $type eq 's' ? '' : 0) unless $mand; + return (1, $opt, $ctl, $type eq 's' ? '' : 0) ;#unless $mand; $optarg = 0 unless $type eq 's'; } @@ -1064,6 +1064,7 @@ sub FindOption ($$$$$) { ? ($optarg eq '') : !(defined $rest || @$argv > 0) ) { # Complain if this option needs an argument. +# if ( $mand && !($type eq 's' ? defined($optarg) : 0) ) { if ( $mand ) { return (0) if $passthrough; warn ("Option ", $opt, " requires an argument\n"); @@ -2257,7 +2258,7 @@ processed. The only exception is when C<--> is used: --foo arg1 --bar arg2 -- arg3 This will call the callback routine for arg1 and arg2, and then -terminate GetOptions() leaving C<"arg2"> in C<@ARGV>. +terminate GetOptions() leaving C<"arg3"> in C<@ARGV>. If C<require_order> is enabled, options processing terminates when the first non-option is encountered. |