From b0ff1e4262fa7f09c9cdb91206b6d2a2a1aa06a7 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Tue, 3 Mar 2009 10:36:02 +0000 Subject: Added parsing of labels with spaces (thanks to Kang) --- lib/Nagios/Plugin/Threshold.pm | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib/Nagios/Plugin/Threshold.pm') diff --git a/lib/Nagios/Plugin/Threshold.pm b/lib/Nagios/Plugin/Threshold.pm index 145b89f..73fce53 100644 --- a/lib/Nagios/Plugin/Threshold.pm +++ b/lib/Nagios/Plugin/Threshold.pm @@ -39,6 +39,9 @@ sub _inflate return $value; } + # Another quick exit if $value is an empty string + return Nagios::Plugin::Range->new if $value eq ""; + # Otherwise parse $value my $range = Nagios::Plugin::Range->parse_range_string($value); nagios_die("Cannot parse $key range: '$value'") unless(defined($range)); -- cgit v1.2.3-74-g34f1