| 1 |
|
| 2 |
1.11 This is a distribution maintenance release. No new |
| 3 |
features or bugfixes were added, there is no need |
| 4 |
to update from version 1.10. |
| 5 |
|
| 6 |
There are two reasons for the changes: a new version |
| 7 |
of CPAN.pm and the CPANTS code quality checks. |
| 8 |
|
| 9 |
Adapted tests to run with CPAN.pm 1.90. |
| 10 |
|
| 11 |
Moved change log from README section "What's new" to |
| 12 |
this file. |
| 13 |
|
| 14 |
Added META.yaml. |
| 15 |
|
| 16 |
Added demos. |
| 17 |
|
| 18 |
Added POD test scripts: t/pod.t and t/pod-coverage.t. |
| 19 |
|
| 20 |
POD optimizations and fixes. |
| 21 |
|
| 22 |
|
| 23 |
1.10 New options "resolveRelativePathes" and "resolveEnvVars" |
| 24 |
make it behave like the shell in resolving relative |
| 25 |
pathes (relative to the option file they are used in) |
| 26 |
and environment variables. |
| 27 |
|
| 28 |
1.09 This version integrates several improvements suggested |
| 29 |
by Kathryn Andersen, provided as complete patches that |
| 30 |
were carefully prepared. Thanks! |
| 31 |
|
| 32 |
First, option "startupFilename" accepts *lists* now, |
| 33 |
both directly provided and supplied by a callback. |
| 34 |
For each startup directory, the list is searched for |
| 35 |
the name of an existing file. The first matching file |
| 36 |
gets processed. |
| 37 |
|
| 38 |
Example: |
| 39 |
|
| 40 |
use Getopt::ArgvFile startupFilenames=>[qw(.rc .cfg)]; |
| 41 |
|
| 42 |
searches for startup files named ".rc" and ".cfg" |
| 43 |
(in this order), using the first file available |
| 44 |
in each startup path. |
| 45 |
|
| 46 |
Second, a new option "fileOption" allows to declare |
| 47 |
an option usable instead of an option file *prefix*, |
| 48 |
intended to make option files more familiar to new |
| 49 |
users. |
| 50 |
|
| 51 |
Example: |
| 52 |
|
| 53 |
use Getopt::ArgvFile fileOption=>'options'; |
| 54 |
|
| 55 |
allows to specify an option file by |
| 56 |
|
| 57 |
... -options file ... |
| 58 |
|
| 59 |
, which is a synonym for (the still valid) |
| 60 |
|
| 61 |
... @file |
| 62 |
|
| 63 |
Nesting and cascading still work as before. |
| 64 |
|
| 65 |
Example: |
| 66 |
|
| 67 |
... -options -options file |
| 68 |
|
| 69 |
is a synonym for (the still valid) |
| 70 |
|
| 71 |
... @@file |
| 72 |
|
| 73 |
syntax. |
| 74 |
|
| 75 |
Besides these patches, Test::More::eq_array() turned |
| 76 |
out to be buggy (in older versions of Test::More, at |
| 77 |
least), so tests now use the well working |
| 78 |
Test::More::is_deeply() function. |
| 79 |
|
| 80 |
Finally, the results of "startupFilename" callbacks |
| 81 |
were not checked yet. This is fixed. |
| 82 |
|
| 83 |
1.08 In very rare circumstances, the one line processing |
| 84 |
via use() that was introduced with 1.07 could break |
| 85 |
older scripts written for 1.06 or before. These were |
| 86 |
the conditions: |
| 87 |
|
| 88 |
* The module was loaded by "use Getopt::ArgvFile", |
| 89 |
without import hints. |
| 90 |
|
| 91 |
* Therefore, &argvFile was not imported into the |
| 92 |
loaders namespace, so it had to be called via full |
| 93 |
name as "Getopt::ArgvFile::argvFile(...)". |
| 94 |
|
| 95 |
* The loader made use of cascading (was aware of |
| 96 |
multiple prefixes like in "@@optionfile", of which |
| 97 |
only the first level should be processed by the |
| 98 |
call of argvFile() and remaining hints should be |
| 99 |
passed through to another script). |
| 100 |
|
| 101 |
In such cases, option hints were processed *twice* |
| 102 |
unintentionally with 1.07, cause both "use" and the |
| 103 |
explicit call of argvFile() invoked this processing, |
| 104 |
which caused *two* level hints to be resolved instead |
| 105 |
of one. |
| 106 |
|
| 107 |
To adapt such scripts, 1.08 introduces a "justload" |
| 108 |
switch for "use": |
| 109 |
|
| 110 |
use Getopt::ArgvFile justload=>1; |
| 111 |
|
| 112 |
This loads the module, but suppresses further operations. |
| 113 |
|
| 114 |
Alternatively, one could remove the explicit call |
| 115 |
of Getopt::ArgvFile::argvFile() from affected scripts. |
| 116 |
|
| 117 |
- |
| 118 |
|
| 119 |
More tests added. |
| 120 |
|
| 121 |
1.07 Bugfix: a missing HOME environment variable was not |
| 122 |
handled correctly in all cases, causing error messages. |
| 123 |
Thanks to Matthew Brett for the bug report. |
| 124 |
|
| 125 |
- |
| 126 |
|
| 127 |
It is now possible to process option files while |
| 128 |
the module is loaded. |
| 129 |
|
| 130 |
Before, a typical use looked like this: |
| 131 |
|
| 132 |
use Getopt::ArgvFile qw(argvFile); |
| 133 |
... |
| 134 |
argvFile(default=>1); |
| 135 |
|
| 136 |
While this is still possible and valid, it can be |
| 137 |
reduced to one line now: |
| 138 |
|
| 139 |
use Getopt::ArgvFile default=>1; |
| 140 |
|
| 141 |
Just pass the parameters of argvFile() to use(). |
| 142 |
Thanks to johanl AT darsermann.com for the |
| 143 |
suggestion. |
| 144 |
|
| 145 |
|
| 146 |
1.06 argvFile() takes a new option "startupFilename" |
| 147 |
to let users specify what scheme should be used |
| 148 |
to find startup files (thanks to Helmut Steinbach |
| 149 |
for the initial idea). Names may be specified |
| 150 |
directly or by a reference to a function which |
| 151 |
will then be invoked with the scriptname to |
| 152 |
provide the filename dynamically. |
| 153 |
|
| 154 |
1.05 Using File::Spec::Functions to build filenames |
| 155 |
more portable. |
| 156 |
|
| 157 |
Using Cwd::abs_path() now to check if several |
| 158 |
startup file locations are identical. |
| 159 |
|
| 160 |
Added support for startup files in the *current* |
| 161 |
directory (thanks to Helmut Steinbach for this |
| 162 |
suggestion). |
| 163 |
|
| 164 |
Switched to Test::More (for installation checks). |
| 165 |
|
| 166 |
1.04 fixed a bug: if the script directory was identical |
| 167 |
to the users home and both default and home setting |
| 168 |
were used, the default options were read twice |
| 169 |
(thanks to Manfred Kuegler for the report). |
| 170 |
|
| 171 |
1.03 introduced new parameter "prefix". |
| 172 |
POD comments in option files are supported now |
| 173 |
(according to an idea of Joe Pepin). |
| 174 |
|
| 175 |
1.02 introduced new parameter "array". |
| 176 |
|
| 177 |
1.01 came with an updated README to reflect that the |
| 178 |
required module Text::ParseWords 3.1 is available |
| 179 |
on CPAN now. |