From 3ec5d3b8b2426a9acce2faa23a58e615af62930f Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Tue, 4 Sep 2007 13:17:01 +0000 Subject: Fixed CPAN test failures due to bad MANIFEST. Fixed version numbering Fixed a performance parsing problem where uom=% wasn't being recognised git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1775 f882894a-f735-0410-b71e-b25c423dba1c --- lib/Nagios/Plugin.pm | 3 ++- lib/Nagios/Plugin/Functions.pm | 2 +- lib/Nagios/Plugin/Performance.pm | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/Nagios/Plugin.pm b/lib/Nagios/Plugin.pm index fe83575..cdd3396 100644 --- a/lib/Nagios/Plugin.pm +++ b/lib/Nagios/Plugin.pm @@ -24,7 +24,8 @@ our @EXPORT_OK = qw(%ERRORS); # CPAN stupidly won't index this module without a literal $VERSION here, # so we're forced to duplicate it explicitly -our $VERSION = 0.17; +# Make sure you update $Nagios::Plugin::Functions::VERSION too +our $VERSION = 0.19; # our $VERSION = $Nagios::Plugin::Functions::VERSION; sub new { diff --git a/lib/Nagios/Plugin/Functions.pm b/lib/Nagios/Plugin/Functions.pm index e8b292e..318b2cb 100644 --- a/lib/Nagios/Plugin/Functions.pm +++ b/lib/Nagios/Plugin/Functions.pm @@ -12,7 +12,7 @@ use Params::Validate qw(validate :types); use Math::Calc::Units; # Remember to update Nagios::Plugins as well -our $VERSION = 0.17; +our $VERSION = 0.19; our @STATUS_CODES = qw(OK WARNING CRITICAL UNKNOWN DEPENDENT); diff --git a/lib/Nagios/Plugin/Performance.pm b/lib/Nagios/Plugin/Performance.pm index 7ce5fa1..55e3ddc 100644 --- a/lib/Nagios/Plugin/Performance.pm +++ b/lib/Nagios/Plugin/Performance.pm @@ -25,7 +25,7 @@ sub import { sub _parse { my $class = shift; my $string = shift; - $string =~ s/^([^=]+)=([\d\.]+)(\w*);?([\d\.]+)?;?([\d\.]+)?;?([\d\.]+)?;?([\d\.]+)?\s*//; + $string =~ s/^([^=]+)=([\d\.]+)([\w%]*);?([\d\.]+)?;?([\d\.]+)?;?([\d\.]+)?;?([\d\.]+)?\s*//; return undef unless ((defined $1 && $1 ne "") && (defined $2 && $2 ne "")); my $p = $class->new( label => $1, value => $2+0, uom => $3, warning => $4, critical => $5, -- cgit v1.2.3-74-g34f1