1 Changes in version 2.26
2 -----------------------
4 * New option type: 'o'. It accepts all kinds of integral numbers in
5 Perl style, including decimal (24), octal (012), hexadecimal (0x2f)
8 * Fix problem with getopt_compat not matching +foo=bar.
10 * Remove $VERSION_STRING for production versions.
12 Changes in version 2.26
13 -----------------------
15 * New option type: 'o'. It accepts all kinds of integral numbers in
16 Perl style, including decimal (24), octal (012), hexadecimal (0x2f)
19 * Fix problem with getopt_compat not matching +foo=bar.
21 * Remove $VERSION_STRING for production versions.
23 Changes in version 2.25
24 -----------------------
26 * Change handling of a lone "-" on the command line. It will now be
27 treated as a non-option unless an explicit specification was passed
28 to GetOptions. See the manual.
29 In the old implementation an error was signalled, so no
30 compatibility breaks are expected from this change.
32 * Add $VERSION_STRING. This is the string form of $VERSION. Usually
33 they are identical, unless it is a pre-release in which case
34 $VERSION will be (e.g.) 2.2403 and $VERSION_STRING will be "2.24_03".
36 Changes in version 2.24
37 -----------------------
39 * Add object oriented interface:
42 $p = new Getopt::Long::Parser;
43 $p->configure(...configuration options...);
44 if ($p->getoptions(...options descriptions...)) ...
46 * Add configuration at 'use' time:
48 use Getopt::Long qw(:config no_ignore_case bundling);
50 * Add configuration options "gnu_getopt" and "gnu_compat".
52 "gnu_compat" controls whether --opt= is allowed, and what it should
53 do. Without "gnu_compat", --opt= gives an error. With "gnu_compat",
54 --opt= will give option "opt" and empty value.
55 This is the way GNU getopt_long does it.
57 "gnu_getopt" is a short way of setting "gnu_compat bundling permute
58 no_getopt_compat. With "gnu_getopt", command line handling should be
59 fully compatible with GNU getopt_long.
61 * Correct warnings when the user specified an array or hash
62 destination using a non-lowercase option, e.g. "I=s@".
64 * Correct ambiguous use of 'set' and 'reset' in the Configuration
65 section of the documentation.
67 * Add configuration option "posix_default" to reset to defaults as if
68 POSIXLY_CORRECT were set.
70 * Disallow "no" prefix on configuration options "default", "prefix" and
73 * Add a section "Trouble Shooting" to the documentation, with
74 frequently asked questions.
76 Changes in version 2.23
77 -----------------------
79 * When a call-back routine issues 'die', messages starting with "!"
80 are treated specially. Currently, only "!FINISH" is recognised (see
81 the next bullet point). Other messages that start with "!" are
84 * Change 'die("FINISH") (see changes in 2.21) to die("!FINISH"). This
85 is an incompatible change, but I guess noone is using this yet.
87 Changes in version 2.22
88 -----------------------
90 * Fixes a bug in the combination of aliases and negation.
92 Old: "foo|bar!" allowed negation on foo, but not on bar.
93 New: "foo|bar!" allows negation on foo and bar.
95 Caveat: "foo|f!", with bundling, issues the warning that negation on
96 a short option is ignored. To obtain the desired behaviour, use
98 "foo!" => \$opt_foo, "f" => \$opt_foo
100 "foo|f" => \$opt_foo, "nofoo" => sub { $opt_foo = 0 }
102 Remember that this is _only_ required when bundling is in effect.
104 Changes in version 2.21
105 -----------------------
109 * User defined subroutines should use 'die' to signal errors.
111 * User defined subroutines can preliminary terminate options
112 processing by calling die("FINISH");
114 * Correct erroneous install of Getopt::Long manpage.
115 Previous versions seem to install Getopt::GetoptLong instead of
118 Changes in version 2.20
119 -----------------------
121 * Prevent the magic argument "<>" from being interpreted as option
122 starter characters if it is the first argument passed.
123 To use the characters "<>" as option starters, pass "><" instead.
125 * Changed license: Getopt::Long may now also be used under the Perl
128 * Changed the file name of the distribution kit from "GetoptLong..."
129 to "Getopt-Long-..." to match the standards.
131 Changes in version 2.19
132 -----------------------
134 * Fix a warning bug with bundling_override.
136 There's no version 2.18
137 -----------------------
139 Changes in version 2.17
140 -----------------------
142 * Getopt::Long::config is renamed Getopt::Long::Configure. The old
143 name will remain supported without being documented.
145 * Options can have the specifier '+' to denote that the option value
146 must be incremented each time the option occurs on the command line.
150 Getopt::Long::Configure("bundling");
151 GetOptions ("v+" => \$more);
152 print STDOUT ("more = $more\n");
154 will print "more = 3" when called with "-v", "more = 4" when called
155 with "-vv" (or "-v -v"), and so on.
157 * Getopt::Long now uses autoloading. This substantially reduces the
158 resources required to 'use Getopt::Long' (about 100 lines of over
161 * It is now documented that global option variables like $opt_foo
162 need to be declared using 'use vars ...' when running under 'use
165 * To install, it is now required to use the official procedure:
172 Changes in version 2.16
173 -----------------------
175 * A couple of small additional fixes to the $` $& $' fixes.
177 * The option prefix can be set using config("prefix=...") or, more
178 powerful, with config("prefix_pattern=..."); see the documentation
181 * More 'perl -w' warnings eliminated for obscure cases of bundling.
183 This version is identical to 2.15, which was not released.
185 There's no version 2.14
186 -----------------------
188 Changes in version 2.13
189 -----------------------
191 * All regexps are changed to avoid the use of $`, $& and $'. Using one
192 of these causes all pattern matches in the program to be much slower
195 * Configuration errors are signalled using die() and will cause the
196 program to be terminated (unless eval{...} or $SIG{__DIE__} is
199 * Option parsing errors are now signalled with calls to warn().
201 * In option bundles, numeric values may be embedded in the bundle
204 * More 'perl -w' warnings eliminated for obscure cases of bundling.
206 * Removed non-standard version number matching. Version 1.121 is now
207 more than 1.12 but less than 1.13.
209 Changes in version 2.12
210 -----------------------
212 * A single question mark is allowed as an alias to an option, e.g.
214 GetOptions ("help|?", ...)
216 Changes in version 2.11
217 -----------------------
219 * User linkage may be an object, provided the object is really a hash.
224 sub new () { return bless {}; }
227 my $linkage = Foo->new();
229 GetOptions ($linkage, ... );
231 * Some bug fixes in handling obscure cases of pass-through.
233 Changes in version 2.9
234 ----------------------
236 * A new way to configure Getopt::Long. Instead of setting module local
237 variables, routine Getopt::Long::config can be called with the names
238 of options to be set or reset, e.g.
240 Getopt::Long::config ("no_auto_abbrev", "ignore_case");
242 Configuring by using the module local variables is deprecated, but
243 it will continue to work for backwark compatibility.
245 Changes in version 2.6
246 ----------------------
248 * Handle ignorecase even if autoabbrev is off.
252 Changes in version 2.4
253 ----------------------
255 * Pass-through of unrecognized options. Makes it easy to write wrapper
256 programs that process some of the command line options but pass the
257 others to another program.
259 * Options can be of type HASH, now you can say
263 and have $opt_define{"foo"} set to "bar".
265 * An enhanced skeleton program, skel2.pl, that combines the power of
266 Getopt::Long with Pod::Usage.
267 Module Pod::Usage can be obtained from CPAN,
268 http://www.perl.com/CPAN/authors/Brad_Appleton.
270 Possible incompatibility in version 2.4
271 ---------------------------------------
273 Previous versions of Getopt::Long always downcased the option variable
274 names when ignorecase was in effect. This bug has been corrected. As a
275 consequence, &GetOptions ("Foo") will now set variable $opt_Foo