Integrate mainline (Win2k/MinGW all ok except threads/t/end.t)
[p5sagit/p5-mst-13.2.git] / lib / Getopt / Long / CHANGES
CommitLineData
d6b7ef86 1Changes in version 2.29
2-----------------------
3
4* Fix a problem where options were not recognized when both
5 auto_abbrev and ignore_case were disabled. Thanks to Seth Robertson
6 <seth@systemdetection.com>.
7
8* Remove Carp.
9
bd444ebb 10Changes in version 2.28
11-----------------------
12
13* When an option is specified more than once, a warning is generated
14 if perl is run with -w. This is a correction to 2.27, where it would
15 unconditionally die.
16
17 An example of duplicate specification is GetOptions('foo', 'foo'),
18 but also GetOptions('foo=s', 'foo') and GetOptions('Foo', 'foo')
19 (the latter only when ignore_case is in effect).
20
2d08fc49 21Changes in version 2.27
22-----------------------
23
bd444ebb 24* You can now specify integer options to take an optional argument.
25 that defaults to a specific value. E.g., GetOptions('foo:5' => \$var)
26 will allow $var to get the value 5 when no value was specified with
27 the -foo option on the command line.
28
29 Instead of a value, a '+' may be specified. E.g.,
30 GetOptions('foo:+' => \$var) will allow $var to be incremented when
31 no value was specified with the -foo option on the command line.
32
2d08fc49 33* Fix several problems with internal and external use of 'die' and
34 signal handlers.
35
36* Fixed some bugs with subtle combinations of bundling_override and
37 ignore_case.
38
39* A callback routine that is associated with a hash-valued option will
40 now have both the hask key and the value passed. It used to get only
41 the value passed.
42
43* Eliminated the use of autoloading. Autoloading kept generating
44 problems during development, and when using perlcc.
45
bd444ebb 46* Avoid errors on references when an option is found in error, e.g.
47 GetOptions('fo$@#' => \$var).
48 Thanks to Wolfgang Laun <Wolfgang.Laun@alcatel.at>.
49
50* When an option is specified more than once, an error is now
51 generated. E.g., GetOptions('foo', 'foo').
52 Thanks to Wolfgang Laun <Wolfgang.Laun@alcatel.at>.
53
2d08fc49 54* Lots of internal restructoring to make room for extensions.
55
56* Redesigned the regression tests.
57
bd444ebb 58* Enhance the documentation to prevent common misunderstandings about
59 single character options.
60
7d1b667f 61Changes in version 2.26
62-----------------------
63
64* New option type: 'o'. It accepts all kinds of integral numbers in
65 Perl style, including decimal (24), octal (012), hexadecimal (0x2f)
66 and binary (0b1001).
67
68* Fix problem with getopt_compat not matching +foo=bar.
69
70* Remove $VERSION_STRING for production versions.
71
72Changes in version 2.26
73-----------------------
74
75* New option type: 'o'. It accepts all kinds of integral numbers in
76 Perl style, including decimal (24), octal (012), hexadecimal (0x2f)
77 and binary (0b1001).
78
79* Fix problem with getopt_compat not matching +foo=bar.
80
81* Remove $VERSION_STRING for production versions.
82
83Changes in version 2.25
84-----------------------
85
86* Change handling of a lone "-" on the command line. It will now be
87 treated as a non-option unless an explicit specification was passed
88 to GetOptions. See the manual.
89 In the old implementation an error was signalled, so no
90 compatibility breaks are expected from this change.
91
92* Add $VERSION_STRING. This is the string form of $VERSION. Usually
93 they are identical, unless it is a pre-release in which case
94 $VERSION will be (e.g.) 2.2403 and $VERSION_STRING will be "2.24_03".
95
96Changes in version 2.24
97-----------------------
98
99* Add object oriented interface:
100
101 use Getopt::Long;
102 $p = new Getopt::Long::Parser;
103 $p->configure(...configuration options...);
104 if ($p->getoptions(...options descriptions...)) ...
105
106* Add configuration at 'use' time:
107
108 use Getopt::Long qw(:config no_ignore_case bundling);
109
110* Add configuration options "gnu_getopt" and "gnu_compat".
111
112 "gnu_compat" controls whether --opt= is allowed, and what it should
113 do. Without "gnu_compat", --opt= gives an error. With "gnu_compat",
114 --opt= will give option "opt" and empty value.
115 This is the way GNU getopt_long does it.
116
117 "gnu_getopt" is a short way of setting "gnu_compat bundling permute
118 no_getopt_compat. With "gnu_getopt", command line handling should be
119 fully compatible with GNU getopt_long.
120
121* Correct warnings when the user specified an array or hash
122 destination using a non-lowercase option, e.g. "I=s@".
123
124* Correct ambiguous use of 'set' and 'reset' in the Configuration
125 section of the documentation.
126
127* Add configuration option "posix_default" to reset to defaults as if
128 POSIXLY_CORRECT were set.
129
130* Disallow "no" prefix on configuration options "default", "prefix" and
131 "prefix_pattern".
132
133* Add a section "Trouble Shooting" to the documentation, with
134 frequently asked questions.
135
136Changes in version 2.23
137-----------------------
138
139* When a call-back routine issues 'die', messages starting with "!"
140 are treated specially. Currently, only "!FINISH" is recognised (see
141 the next bullet point). Other messages that start with "!" are
142 ignored.
143
144* Change 'die("FINISH") (see changes in 2.21) to die("!FINISH"). This
145 is an incompatible change, but I guess noone is using this yet.
146
147Changes in version 2.22
148-----------------------
149
150* Fixes a bug in the combination of aliases and negation.
151
152 Old: "foo|bar!" allowed negation on foo, but not on bar.
153 New: "foo|bar!" allows negation on foo and bar.
154
155 Caveat: "foo|f!", with bundling, issues the warning that negation on
156 a short option is ignored. To obtain the desired behaviour, use
157
158 "foo!" => \$opt_foo, "f" => \$opt_foo
159 or
160 "foo|f" => \$opt_foo, "nofoo" => sub { $opt_foo = 0 }
161
162 Remember that this is _only_ required when bundling is in effect.
163
164Changes in version 2.21
165-----------------------
166
167* New documentation.
168
169* User defined subroutines should use 'die' to signal errors.
170
171* User defined subroutines can preliminary terminate options
172 processing by calling die("FINISH");
173
174* Correct erroneous install of Getopt::Long manpage.
175 Previous versions seem to install Getopt::GetoptLong instead of
176 Getopt::Long.
177
178Changes in version 2.20
179-----------------------
180
181* Prevent the magic argument "<>" from being interpreted as option
182 starter characters if it is the first argument passed.
183 To use the characters "<>" as option starters, pass "><" instead.
184
185* Changed license: Getopt::Long may now also be used under the Perl
186 Artistic License.
187
188* Changed the file name of the distribution kit from "GetoptLong..."
189 to "Getopt-Long-..." to match the standards.
190
191Changes in version 2.19
192-----------------------
193
194* Fix a warning bug with bundling_override.
195
196There's no version 2.18
197-----------------------
198
199Changes in version 2.17
200-----------------------
201
202* Getopt::Long::config is renamed Getopt::Long::Configure. The old
203 name will remain supported without being documented.
204
205* Options can have the specifier '+' to denote that the option value
206 must be incremented each time the option occurs on the command line.
207 For example:
208
209 my $more = 2;
210 Getopt::Long::Configure("bundling");
211 GetOptions ("v+" => \$more);
212 print STDOUT ("more = $more\n");
213
214 will print "more = 3" when called with "-v", "more = 4" when called
215 with "-vv" (or "-v -v"), and so on.
216
217* Getopt::Long now uses autoloading. This substantially reduces the
218 resources required to 'use Getopt::Long' (about 100 lines of over
219 1300 total).
220
221* It is now documented that global option variables like $opt_foo
222 need to be declared using 'use vars ...' when running under 'use
223 strict'.
224
225* To install, it is now required to use the official procedure:
226
227 perl Makefile.PL
228 make
229 make test
230 make install
231
232Changes in version 2.16
233-----------------------
234
235* A couple of small additional fixes to the $` $& $' fixes.
236
237* The option prefix can be set using config("prefix=...") or, more
238 powerful, with config("prefix_pattern=..."); see the documentation
239 for details.
240
241* More 'perl -w' warnings eliminated for obscure cases of bundling.
242
243This version is identical to 2.15, which was not released.
244
245There's no version 2.14
246-----------------------
247
248Changes in version 2.13
249-----------------------
250
251* All regexps are changed to avoid the use of $`, $& and $'. Using one
252 of these causes all pattern matches in the program to be much slower
253 than necessary.
254
255* Configuration errors are signalled using die() and will cause the
256 program to be terminated (unless eval{...} or $SIG{__DIE__} is
257 used).
258
259* Option parsing errors are now signalled with calls to warn().
260
261* In option bundles, numeric values may be embedded in the bundle
262 (e.g. -al24w80).
263
264* More 'perl -w' warnings eliminated for obscure cases of bundling.
265
266* Removed non-standard version number matching. Version 1.121 is now
267 more than 1.12 but less than 1.13.
268
269Changes in version 2.12
270-----------------------
271
272* A single question mark is allowed as an alias to an option, e.g.
273
274 GetOptions ("help|?", ...)
275
276Changes in version 2.11
277-----------------------
278
279* User linkage may be an object, provided the object is really a hash.
280
281 For example:
282
283 { package Foo;
284 sub new () { return bless {}; }
285 }
286
287 my $linkage = Foo->new();
288
289 GetOptions ($linkage, ... );
290
291* Some bug fixes in handling obscure cases of pass-through.
292
293Changes in version 2.9
294----------------------
295
296* A new way to configure Getopt::Long. Instead of setting module local
297 variables, routine Getopt::Long::config can be called with the names
298 of options to be set or reset, e.g.
299
300 Getopt::Long::config ("no_auto_abbrev", "ignore_case");
301
302 Configuring by using the module local variables is deprecated, but
303 it will continue to work for backwark compatibility.
304
305Changes in version 2.6
306----------------------
307
308* Handle ignorecase even if autoabbrev is off.
309
310* POD corrections.
311
312Changes in version 2.4
313----------------------
314
315* Pass-through of unrecognized options. Makes it easy to write wrapper
316 programs that process some of the command line options but pass the
317 others to another program.
318
319* Options can be of type HASH, now you can say
320
321 --define foo=bar
322
323 and have $opt_define{"foo"} set to "bar".
324
325* An enhanced skeleton program, skel2.pl, that combines the power of
326 Getopt::Long with Pod::Usage.
327 Module Pod::Usage can be obtained from CPAN,
328 http://www.perl.com/CPAN/authors/Brad_Appleton.
329
330Possible incompatibility in version 2.4
331---------------------------------------
332
333Previous versions of Getopt::Long always downcased the option variable
334names when ignorecase was in effect. This bug has been corrected. As a
335consequence, &GetOptions ("Foo") will now set variable $opt_Foo
336instead of $opt_foo.
337