package Getopt::Long;
-# RCS Status : $Id: GetoptLong.pm,v 2.63 2003-04-04 18:44:03+02 jv Exp jv $
+# RCS Status : $Id: GetoptLong.pm,v 2.65 2003-05-19 17:44:13+02 jv Exp $
# Author : Johan Vromans
# Created On : Tue Sep 11 15:00:12 1990
# Last Modified By: Johan Vromans
-# Last Modified On: Thu May 15 14:48:48 2003
-# Update Count : 1321
+# Last Modified On: Mon May 19 17:43:33 2003
+# Update Count : 1330
# Status : Released
################ Copyright ################
use strict;
use vars qw($VERSION);
-$VERSION = 2.3205;
+$VERSION = 2.33;
# For testing versions only.
-use vars qw($VERSION_STRING);
-$VERSION_STRING = "2.32_05";
+#use vars qw($VERSION_STRING);
+#$VERSION_STRING = "2.32_06";
use Exporter;
use vars qw(@ISA @EXPORT @EXPORT_OK);
$ignorecase = 1; # ignore case when matching options
$passthrough = 0; # leave unrecognized options alone
$gnu_compat = 0; # require --opt=val if value is optional
-
- # Version-dependent defaults. Leave undefined.
- # $auto_help = $requested_version >= 2.3203; # supply --help handler
- # $auto_version = $requested_version >= 2.3203; # supply --version handler
}
# Override import.
$error = '';
print STDERR ("Getopt::Long $Getopt::Long::VERSION (",
- '$Revision: 2.63 $', ") ",
+ '$Revision: 2.65 $', ") ",
"called from package \"$pkg\".",
"\n ",
"ARGV: (@ARGV)",
"\n",
"(", __PACKAGE__, "::", "GetOptions",
" version ",
- defined($VERSION_STRING) ? $VERSION_STRING : $VERSION, ";",
+ defined($Getopt::Long::VERSION_STRING)
+ ? $Getopt::Long::VERSION_STRING : $VERSION, ";",
" Perl version ",
$] >= 5.006 ? sprintf("%vd", $^V) : $],
")\n");
Automatically provide support for the B<--help> and B<-?> options if
the application did not specify a handler for this option itself.
-Getopt::Long will provide a help message using module Pod::Usage. The
+Getopt::Long will provide a help message using module L<Pod::Usage>. The
message, derived from the SYNOPSIS POD section, will be written to
standard output and processing will terminate.
=item HelpMessage
This subroutine produces a standard help message, derived from the
-program's POD section SYNOPSIS using Pod::Usage. It takes the same
+program's POD section SYNOPSIS using L<Pod::Usage>. It takes the same
arguments as VersionMessage(). In particular, you cannot tie it
directly to an option, e.g.:
The command line is not split by GetOptions, but by the command line
interpreter (CLI). On Unix, this is the shell. On Windows, it is
-COMMAND.COM or CMD.EXE. Other operating systems have other CLIs.
+COMMAND.COM or CMD.EXE. Other operating systems have other CLIs.
It is important to know that these CLIs may behave different when the
command line contains special characters, in particular quotes or
=head1 COPYRIGHT AND DISCLAIMER
-This program is Copyright 2002,1990 by Johan Vromans.
+This program is Copyright 2003,1990 by Johan Vromans.
This program is free software; you can redistribute it and/or
modify it under the terms of the Perl Artistic License or the
GNU General Public License as published by the Free Software
**************** WARNING -- EXPERIMENTAL CODE AHEAD ****************
+The following new features are marked experimental. This means that if
+you are going to use them you _must_ watch out for the next release of
+Getopt::Long to see if the API has changed.
+
* Getopt::Long can automatically handle --version and --help options
if the calling program did not specify a handler explicitly.
Example:
- use Getopt::Long 2.3203 qw(GetOptions HelpMessage);
+ use Getopt::Long 2.33 qw(GetOptions HelpMessage);
GetOptions(...) or HelpMessage(2);
**************** END EXPERIMENTAL CODE ****************
* Subroutine Configure can now be exported on demand.
* Negatable options (with "!") now also support the "no-" prefix.
- On request of Ed Avis <eavis@amadeus.net>.
+ On request of Ed Avis.
* Some fixes with hashes and bundling.
- Thanks to Anders Johnson <anders@wis-tech.com> and Andrei Gnepp <>.
+ Thanks to Anders Johnson and Andrei Gnepp.
Mandatory/optional status for hash values is now effective.
String valued options with no value now default to the empty string
instead of 1 (one).
* Fix a pass_through bug where the options terminator (normally "--")
was not passed through in @ARGV.
- Thanks to Philippe Verdret <philippe.verdret@xps-pro.com>.
+ Thanks to Philippe Verdret.
* Add FAQ: I "use GetOpt::Long;" (Windows) and now it doesn't work.
* Fix a problem where a 'die' from a 'warn' via a localized
$SIG{__WARN__} was not properly propagated from a callback.
- Thanks to Diab Jerius <dj@head-cfa.harvard.edu>.
+ Thanks to Diab Jerius.
Changes in version 2.29
-----------------------
* Fix a problem where options were not recognized when both
- auto_abbrev and ignore_case were disabled. Thanks to Seth Robertson
- <seth@systemdetection.com>.
+ auto_abbrev and ignore_case were disabled. Thanks to Seth Robertson.
* Remove Carp.
* Avoid errors on references when an option is found in error, e.g.
GetOptions('fo$@#' => \$var).
- Thanks to Wolfgang Laun <Wolfgang.Laun@alcatel.at>.
+ Thanks to Wolfgang Laun.
* When an option is specified more than once, an error is now
generated. E.g., GetOptions('foo', 'foo').
- Thanks to Wolfgang Laun <Wolfgang.Laun@alcatel.at>.
+ Thanks to Wolfgang Laun.
* Lots of internal restructoring to make room for extensions.
Using the object oriented interface, multiple parser objects can be
instantiated, each having their own configuration settings:
- $p1 = new Getopt::Long::Parser (config => ["posix"]);
- $p2 = new Getopt::Long::Parser (config => ["no_posix"]);
+ $p1 = new Getopt::Long::Parser (config => ["bundling"]);
+ $p2 = new Getopt::Long::Parser (config => ["posix"]);
if ($p1->getoptions(...options descriptions...)) ...
AVAILABILITY
COPYRIGHT AND DISCLAIMER
========================
-Module Getopt::Long is Copyright 2002,1990 by Johan Vromans.
+Module Getopt::Long is Copyright 2003,1990 by Johan Vromans.
This program is free software; you can redistribute it and/or
modify it under the terms of the Perl Artistic License or the
GNU General Public License as published by the Free Software