summaryrefslogtreecommitdiffstats
path: root/README
diff options
context:
space:
mode:
authorEvgeni Golov <evgeni@golov.de>2014-10-03 18:41:51 (GMT)
committerEvgeni Golov <sargentd@die-welt.net>2014-10-03 19:11:37 (GMT)
commitc29f2b286752f844a7659ec38fc22aeb02f0ff45 (patch)
tree08c0a471ccab950bda0660757f5d53bf4935fa03 /README
parentdfae38b656242898ce962c9ad93ed66be45fc3d4 (diff)
downloadmonitoring-plugin-perl-c29f2b2.tar.gz
GetOpt::Long optional arguments using a colon instead of an equal sign
Instead of writing `foo|f=s` you can also write `foo|f:s` for a GetOpt::Long option spec [1], thus making the argument optional. The current implementation of `_spec_to_help` will wrongly render this as two long options: --dirport, --d:9030 directory port instead of a short and a long one: -d, --dirport=INTEGER directory port This commit fixes the the parsing of the spec, detection of the type and adds tests for a few common cases this could be used in. [1] http://perldoc.perl.org/Getopt/Long.html#Summary-of-Option-Specifications
Diffstat (limited to 'README')
0 files changed, 0 insertions, 0 deletions