dagolden / getopt-lucid

(Perl) Clear, readable syntax for command line processing

This URL has Read+Write access

David Golden (author)
Thu Apr 30 08:21:43 -0700 2009
commit  9cbdd10e87f1df405ce8d6e068bf1bab946f884f
tree    a037d3553fb028643d3439796a41d286a5fa731a
parent  add074041ae4f32a548116e5cb3bf115753a711f
getopt-lucid / Changes
100644 97 lines (88 sloc) 4.153 kb
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
Revision history for Perl module Getopt::Lucid
 
0.19
 
0.18 Thu Mar 12 00:11:11 EDT 2009
    - Options with validation specs will not fail just because the option
      is not seen on the command line. Validation is now only done on default
      values provided in the spec or in merge/append/replace (to ensure
      consistency) and on options that appear on the command line.
 
0.17 Thu Feb 21 07:15:40 EST 2008
    - Clarify 5.006 as minimum requirement; updated other minimum requirements
    - A repeated param option now replaces instead of throwing an error
    - Fix for ambiguous param bug (RT#33462, patch from Torsten Link)
    - Updated distribution packaging (custom Build.PL, author tests moved
      to xt/ directory, documentation with Pod::WikiDoc, etc.)
    - Changed to the Apache License, version 2.0; (it's clearer, relicensable,
      and is explicit about contributions)
 
0.16 Thu Aug 17 23:04:38 EDT 2006
    - Required Param options with validation no longer throw and error
      from failing to validate the default empty-string (fixes RT#20938)
    - Clarified documentation about validation and default values
    - Various Pod revisions
 
0.14 Wed Feb 8 11:32:22 EST 2006
    - fixed typo in Pod
    - removed Test::Exception dependencies
    - removed 5.006 specific syntax
    - added optional pod/podcoverage tests (skipped by default)
    - switching to even numbering for releases
 
0.12 Tue Sep 20 13:10:19 EDT 2005
    - added support for option names with GNU-style dashes; accessors
      substitute underscore for dashes. (Suggested by Steven Vasilogianis)
 
0.11 Sat Jul 30 11:03:46 EDT 2005
    - moved build_requires prereqs into requires to work around
      a CPANPLUS bug for users preferring Build.PL
    - replaced Clone::Any::clone with Storable::dclone for fewer
      non-core dependencies
    - removed Cookbook stub for now
 
0.10 Tue Jul 12 19:28:59 EDT 2005
    - Single character (alphanumeric) switches
    - Exception-based error handling
    - Specification validation
    - Command-line validation against spec
    - Bundled single-character switches
    - Long-style (alphanumeric) switches
    - Long/short/multiple switch aliases
    - Keys in resulting option hash are names stripped of any leading dashes
    - Option names/aliases must be unique
    - Option termination string "--"
    - Counters
    - Parameters (w/o "=") (values can't be ambiguous)
    - Parameters (w "=")
    - Lists
    - Pass through non-options (preserving order)
    - Throw exceptions on unrecognized non-bareword options
    - Check for valid and invalid option name characters
    - Keypairs (e.g. "--define os=linux")
    - Bareword options
    - Required options
    - Default values
    - Case insensitivity
    - Validation (regex)
    - Validation (code subroutine)
    - Dependencies
    - parse other arrays than @ARGV
    - names() function
    - accessors for options in spec
    - merge() function
    - pass through single dash
    - provide separate merge_default() and add_default() functions
    - require option_spec for new()
    - make getopt call new if called as a class function and return the object
      not a hash of options
    - provide defaults() and reset_defaults() functions
    - rename push_defaults to append_defaults
    - make sure merge_defaults ignores anything not in the spec
    - implement replace_defaults()
    - make *_defaults check that lists/keypairs are passing right type
    - Support *_defaults() taking a hashref or a hash as input
    - revamp argument spec to new, simpler format
    - validation on lists (validate each value)
    - validation on keypairs (simple validation for keys/values as a whole)
    - "magic" mode as the default: take barewords in spec and handle any form
      that appears to match it
    - add "strict" argument to use for less magic on names/aliases
    - Negation (only for switch/counter/parameter bare/longform):
      sets to zero/undef
    - Negation with = (for list/keypair bare/longform):
      removes matching element/key
    - Negation without = (for list/keypair bare/longform):
      blanks entire list/hash