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