monitoring-plugins / monitoring-plugin-perl

Perl module Monitoring::Plugin - Nagios::Plugin
http://search.cpan.org/dist/Monitoring-Plugin/
42 stars 20 forks source link

Allow negation of command line arguments using '--no'-prefix #13

Closed mstock closed 7 years ago

mstock commented 7 years ago

Getopt::Long supports negatable boolean options by appending an ! to the option specification, so this allows to use this functionality with Monitoring::Plugin::Getopt as well. This actually already kind-of worked, but with not very useful help output and the way one had to access the option value depended on if the option was passed on the command line or not.

sni commented 7 years ago

Thanks, merged. This is how all pull requests should look like. Much appreciated.