summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Monitoring/Plugin/Getopt.pm4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Monitoring/Plugin/Getopt.pm b/lib/Monitoring/Plugin/Getopt.pm
index ebdd559..e09ff62 100644
--- a/lib/Monitoring/Plugin/Getopt.pm
+++ b/lib/Monitoring/Plugin/Getopt.pm
@@ -81,7 +81,7 @@ sub _spec_to_help
81{ 81{
82 my ($self, $spec, $label) = @_; 82 my ($self, $spec, $label) = @_;
83 83
84 my ($opts, $type) = split /=/, $spec, 2; 84 my ($opts, $type) = split /=|:/, $spec, 2;
85 my (@short, @long); 85 my (@short, @long);
86 for (split /\|/, $opts) { 86 for (split /\|/, $opts) {
87 if (length $_ == 1) { 87 if (length $_ == 1) {
@@ -97,7 +97,7 @@ sub _spec_to_help
97 $help .= '=' . $label; 97 $help .= '=' . $label;
98 } 98 }
99 else { 99 else {
100 $help .= $type eq 'i' ? '=INTEGER' : '=STRING'; 100 $help .= ($type eq 'i' || $type eq '+' || $type =~ /\d+/) ? '=INTEGER' : '=STRING';
101 } 101 }
102 } 102 }
103 elsif ($label) { 103 elsif ($label) {