Rename the Getopt::Long tests to be as they are
[p5sagit/p5-mst-13.2.git] / lib / Getopt / Long / CHANGES
CommitLineData
7d1b667f 1Changes in version 2.26
2-----------------------
3
4* New option type: 'o'. It accepts all kinds of integral numbers in
5 Perl style, including decimal (24), octal (012), hexadecimal (0x2f)
6 and binary (0b1001).
7
8* Fix problem with getopt_compat not matching +foo=bar.
9
10* Remove $VERSION_STRING for production versions.
11
12Changes in version 2.26
13-----------------------
14
15* New option type: 'o'. It accepts all kinds of integral numbers in
16 Perl style, including decimal (24), octal (012), hexadecimal (0x2f)
17 and binary (0b1001).
18
19* Fix problem with getopt_compat not matching +foo=bar.
20
21* Remove $VERSION_STRING for production versions.
22
23Changes in version 2.25
24-----------------------
25
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.
31
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".
35
36Changes in version 2.24
37-----------------------
38
39* Add object oriented interface:
40
41 use Getopt::Long;
42 $p = new Getopt::Long::Parser;
43 $p->configure(...configuration options...);
44 if ($p->getoptions(...options descriptions...)) ...
45
46* Add configuration at 'use' time:
47
48 use Getopt::Long qw(:config no_ignore_case bundling);
49
50* Add configuration options "gnu_getopt" and "gnu_compat".
51
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.
56
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.
60
61* Correct warnings when the user specified an array or hash
62 destination using a non-lowercase option, e.g. "I=s@".
63
64* Correct ambiguous use of 'set' and 'reset' in the Configuration
65 section of the documentation.
66
67* Add configuration option "posix_default" to reset to defaults as if
68 POSIXLY_CORRECT were set.
69
70* Disallow "no" prefix on configuration options "default", "prefix" and
71 "prefix_pattern".
72
73* Add a section "Trouble Shooting" to the documentation, with
74 frequently asked questions.
75
76Changes in version 2.23
77-----------------------
78
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
82 ignored.
83
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.
86
87Changes in version 2.22
88-----------------------
89
90* Fixes a bug in the combination of aliases and negation.
91
92 Old: "foo|bar!" allowed negation on foo, but not on bar.
93 New: "foo|bar!" allows negation on foo and bar.
94
95 Caveat: "foo|f!", with bundling, issues the warning that negation on
96 a short option is ignored. To obtain the desired behaviour, use
97
98 "foo!" => \$opt_foo, "f" => \$opt_foo
99 or
100 "foo|f" => \$opt_foo, "nofoo" => sub { $opt_foo = 0 }
101
102 Remember that this is _only_ required when bundling is in effect.
103
104Changes in version 2.21
105-----------------------
106
107* New documentation.
108
109* User defined subroutines should use 'die' to signal errors.
110
111* User defined subroutines can preliminary terminate options
112 processing by calling die("FINISH");
113
114* Correct erroneous install of Getopt::Long manpage.
115 Previous versions seem to install Getopt::GetoptLong instead of
116 Getopt::Long.
117
118Changes in version 2.20
119-----------------------
120
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.
124
125* Changed license: Getopt::Long may now also be used under the Perl
126 Artistic License.
127
128* Changed the file name of the distribution kit from "GetoptLong..."
129 to "Getopt-Long-..." to match the standards.
130
131Changes in version 2.19
132-----------------------
133
134* Fix a warning bug with bundling_override.
135
136There's no version 2.18
137-----------------------
138
139Changes in version 2.17
140-----------------------
141
142* Getopt::Long::config is renamed Getopt::Long::Configure. The old
143 name will remain supported without being documented.
144
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.
147 For example:
148
149 my $more = 2;
150 Getopt::Long::Configure("bundling");
151 GetOptions ("v+" => \$more);
152 print STDOUT ("more = $more\n");
153
154 will print "more = 3" when called with "-v", "more = 4" when called
155 with "-vv" (or "-v -v"), and so on.
156
157* Getopt::Long now uses autoloading. This substantially reduces the
158 resources required to 'use Getopt::Long' (about 100 lines of over
159 1300 total).
160
161* It is now documented that global option variables like $opt_foo
162 need to be declared using 'use vars ...' when running under 'use
163 strict'.
164
165* To install, it is now required to use the official procedure:
166
167 perl Makefile.PL
168 make
169 make test
170 make install
171
172Changes in version 2.16
173-----------------------
174
175* A couple of small additional fixes to the $` $& $' fixes.
176
177* The option prefix can be set using config("prefix=...") or, more
178 powerful, with config("prefix_pattern=..."); see the documentation
179 for details.
180
181* More 'perl -w' warnings eliminated for obscure cases of bundling.
182
183This version is identical to 2.15, which was not released.
184
185There's no version 2.14
186-----------------------
187
188Changes in version 2.13
189-----------------------
190
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
193 than necessary.
194
195* Configuration errors are signalled using die() and will cause the
196 program to be terminated (unless eval{...} or $SIG{__DIE__} is
197 used).
198
199* Option parsing errors are now signalled with calls to warn().
200
201* In option bundles, numeric values may be embedded in the bundle
202 (e.g. -al24w80).
203
204* More 'perl -w' warnings eliminated for obscure cases of bundling.
205
206* Removed non-standard version number matching. Version 1.121 is now
207 more than 1.12 but less than 1.13.
208
209Changes in version 2.12
210-----------------------
211
212* A single question mark is allowed as an alias to an option, e.g.
213
214 GetOptions ("help|?", ...)
215
216Changes in version 2.11
217-----------------------
218
219* User linkage may be an object, provided the object is really a hash.
220
221 For example:
222
223 { package Foo;
224 sub new () { return bless {}; }
225 }
226
227 my $linkage = Foo->new();
228
229 GetOptions ($linkage, ... );
230
231* Some bug fixes in handling obscure cases of pass-through.
232
233Changes in version 2.9
234----------------------
235
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.
239
240 Getopt::Long::config ("no_auto_abbrev", "ignore_case");
241
242 Configuring by using the module local variables is deprecated, but
243 it will continue to work for backwark compatibility.
244
245Changes in version 2.6
246----------------------
247
248* Handle ignorecase even if autoabbrev is off.
249
250* POD corrections.
251
252Changes in version 2.4
253----------------------
254
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.
258
259* Options can be of type HASH, now you can say
260
261 --define foo=bar
262
263 and have $opt_define{"foo"} set to "bar".
264
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.
269
270Possible incompatibility in version 2.4
271---------------------------------------
272
273Previous versions of Getopt::Long always downcased the option variable
274names when ignorecase was in effect. This bug has been corrected. As a
275consequence, &GetOptions ("Foo") will now set variable $opt_Foo
276instead of $opt_foo.
277