summaryrefslogtreecommitdiff
path: root/lib/Getopt/Long/CHANGES
blob: deaa472fb23615d04ecebacfc1de15d13354cc03 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
Changes in version 2.27
-----------------------

* Fix several problems with internal and external use of 'die' and
  signal handlers.

* Fixed some bugs with subtle combinations of bundling_override and
  ignore_case.

* A callback routine that is associated with a hash-valued option will
  now have both the hask key and the value passed. It used to get only
  the value passed.

* Eliminated the use of autoloading. Autoloading kept generating
  problems during development, and when using perlcc.

* Lots of internal restructoring to make room for extensions.

* Redesigned the regression tests.

Changes in version 2.26
-----------------------

* New option type: 'o'. It accepts all kinds of integral numbers in
  Perl style, including decimal (24), octal (012), hexadecimal (0x2f)
  and binary (0b1001).

* Fix problem with getopt_compat not matching +foo=bar.

* Remove $VERSION_STRING for production versions.

Changes in version 2.26
-----------------------

* New option type: 'o'. It accepts all kinds of integral numbers in
  Perl style, including decimal (24), octal (012), hexadecimal (0x2f)
  and binary (0b1001).

* Fix problem with getopt_compat not matching +foo=bar.

* Remove $VERSION_STRING for production versions.

Changes in version 2.25
-----------------------

* Change handling of a lone "-" on the command line. It will now be
  treated as a non-option unless an explicit specification was passed
  to GetOptions. See the manual.
  In the old implementation an error was signalled, so no
  compatibility breaks are expected from this change.

* Add $VERSION_STRING. This is the string form of $VERSION. Usually
  they are identical, unless it is a pre-release in which case
  $VERSION will be (e.g.) 2.2403 and $VERSION_STRING will be "2.24_03".

Changes in version 2.24
-----------------------

* Add object oriented interface:

    use Getopt::Long;
    $p = new Getopt::Long::Parser;
    $p->configure(...configuration options...);
    if ($p->getoptions(...options descriptions...)) ...

* Add configuration at 'use' time:

    use Getopt::Long qw(:config no_ignore_case bundling);

* Add configuration options "gnu_getopt" and "gnu_compat".

  "gnu_compat" controls whether --opt= is allowed, and what it should
  do. Without "gnu_compat", --opt= gives an error. With "gnu_compat", 
  --opt= will give option "opt" and empty value.
  This is the way GNU getopt_long does it.

  "gnu_getopt" is a short way of setting "gnu_compat bundling permute
  no_getopt_compat. With "gnu_getopt", command line handling should be
  fully compatible with GNU getopt_long.

* Correct warnings when the user specified an array or hash
  destination using a non-lowercase option, e.g. "I=s@".

* Correct ambiguous use of 'set' and 'reset' in the Configuration
  section of the documentation. 

* Add configuration option "posix_default" to reset to defaults as if
  POSIXLY_CORRECT were set.

* Disallow "no" prefix on configuration options "default", "prefix" and
  "prefix_pattern". 

* Add a section "Trouble Shooting" to the documentation, with
  frequently asked questions.

Changes in version 2.23
-----------------------

* When a call-back routine issues 'die', messages starting with "!"
  are treated specially. Currently, only "!FINISH" is recognised (see
  the next bullet point). Other messages that start with "!" are
  ignored.

* Change 'die("FINISH") (see changes in 2.21) to die("!FINISH"). This
  is an incompatible change, but I guess noone is using this yet.

Changes in version 2.22
-----------------------

* Fixes a bug in the combination of aliases and negation.

  Old:  "foo|bar!" allowed negation on foo, but not on bar.
  New:  "foo|bar!" allows negation on foo and bar.

  Caveat: "foo|f!", with bundling, issues the warning that negation on
  a short option is ignored. To obtain the desired behaviour, use

	"foo!" => \$opt_foo, "f" => \$opt_foo
  or
	"foo|f" => \$opt_foo, "nofoo" => sub { $opt_foo = 0 }

  Remember that this is _only_ required when bundling is in effect.

Changes in version 2.21
-----------------------

* New documentation.

* User defined subroutines should use 'die' to signal errors.

* User defined subroutines can preliminary terminate options
  processing by calling die("FINISH");

* Correct erroneous install of Getopt::Long manpage.
  Previous versions seem to install Getopt::GetoptLong instead of
  Getopt::Long.

Changes in version 2.20
-----------------------

* Prevent the magic argument "<>" from being interpreted as option
  starter characters if it is the first argument passed.
  To use the characters "<>" as option starters, pass "><" instead.

* Changed license: Getopt::Long may now also be used under the Perl
  Artistic License.

* Changed the file name of the distribution kit from "GetoptLong..."
  to "Getopt-Long-..." to match the standards.

Changes in version 2.19
-----------------------

* Fix a warning bug with bundling_override.

There's no version 2.18
-----------------------

Changes in version 2.17
-----------------------

* Getopt::Long::config is renamed Getopt::Long::Configure. The old
  name will remain supported without being documented.

* Options can have the specifier '+' to denote that the option value
  must be incremented each time the option occurs on the command line.
  For example:

     my $more = 2;
     Getopt::Long::Configure("bundling");
     GetOptions ("v+" => \$more);
     print STDOUT ("more = $more\n");

  will print "more = 3" when called with "-v", "more = 4" when called
  with "-vv" (or "-v -v"), and so on.

* Getopt::Long now uses autoloading. This substantially reduces the
  resources required to 'use Getopt::Long' (about 100 lines of over
  1300 total).

* It is now documented that global option variables like $opt_foo
  need to be declared using 'use vars ...' when running under 'use
  strict'. 

* To install, it is now required to use the official procedure:

     perl Makefile.PL
     make
     make test
     make install

Changes in version 2.16
-----------------------

* A couple of small additional fixes to the $` $& $' fixes.

* The option prefix can be set using config("prefix=...") or, more
  powerful, with config("prefix_pattern=..."); see the documentation
  for details.

* More 'perl -w' warnings eliminated for obscure cases of bundling.

This version is identical to 2.15, which was not released.

There's no version 2.14
-----------------------

Changes in version 2.13
-----------------------

* All regexps are changed to avoid the use of $`, $& and $'. Using one
  of these causes all pattern matches in the program to be much slower
  than necessary.

* Configuration errors are signalled using die() and will cause the
  program to be terminated (unless eval{...} or $SIG{__DIE__} is
  used).

* Option parsing errors are now signalled with calls to warn().

* In option bundles, numeric values may be embedded in the bundle
  (e.g. -al24w80).

* More 'perl -w' warnings eliminated for obscure cases of bundling.

* Removed non-standard version number matching. Version 1.121 is now
  more than 1.12 but less than 1.13. 

Changes in version 2.12
-----------------------

* A single question mark is allowed as an alias to an option, e.g. 

    GetOptions ("help|?", ...)

Changes in version 2.11
-----------------------

* User linkage may be an object, provided the object is really a hash.

  For example:

    {	package Foo;
	sub new () { return bless {}; }
    }

    my $linkage = Foo->new();

    GetOptions ($linkage, ... );

* Some bug fixes in handling obscure cases of pass-through.

Changes in version 2.9
----------------------

* A new way to configure Getopt::Long. Instead of setting module local
  variables, routine Getopt::Long::config can be called with the names
  of options to be set or reset, e.g.

    Getopt::Long::config ("no_auto_abbrev", "ignore_case");

  Configuring by using the module local variables is deprecated, but
  it will continue to work for backwark compatibility.

Changes in version 2.6
----------------------

* Handle ignorecase even if autoabbrev is off. 

* POD corrections.

Changes in version 2.4
----------------------

* Pass-through of unrecognized options. Makes it easy to write wrapper
  programs that process some of the command line options but pass the
  others to another program.

* Options can be of type HASH, now you can say

    --define foo=bar

  and have $opt_define{"foo"} set to "bar".

* An enhanced skeleton program, skel2.pl, that combines the power of
  Getopt::Long with Pod::Usage. 
  Module Pod::Usage can be obtained from CPAN,
  http://www.perl.com/CPAN/authors/Brad_Appleton. 

Possible incompatibility in version 2.4
---------------------------------------

Previous versions of Getopt::Long always downcased the option variable
names when ignorecase was in effect. This bug has been corrected. As a
consequence, &GetOptions ("Foo") will now set variable $opt_Foo
instead of $opt_foo.