r37639 - in /branches/upstream/libnagios-plugin-perl/current: Changes META.yml lib/Nagios/Plugin.pm lib/Nagios/Plugin/Functions.pm lib/Nagios/Plugin/Performance.pm t/Nagios-Plugin-Performance.t

ryan52-guest at users.alioth.debian.org ryan52-guest at users.alioth.debian.org
Fri Jun 5 23:25:45 UTC 2009


Author: ryan52-guest
Date: Fri Jun  5 23:25:41 2009
New Revision: 37639

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=37639
Log:
[svn-upgrade] Integrating new upstream version, libnagios-plugin-perl (0.33)

Modified:
    branches/upstream/libnagios-plugin-perl/current/Changes
    branches/upstream/libnagios-plugin-perl/current/META.yml
    branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin.pm
    branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin/Functions.pm
    branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin/Performance.pm
    branches/upstream/libnagios-plugin-perl/current/t/Nagios-Plugin-Performance.t

Modified: branches/upstream/libnagios-plugin-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-plugin-perl/current/Changes?rev=37639&op=diff
==============================================================================
--- branches/upstream/libnagios-plugin-perl/current/Changes (original)
+++ branches/upstream/libnagios-plugin-perl/current/Changes Fri Jun  5 23:25:41 2009
@@ -1,4 +1,7 @@
 Revision history for Perl module Nagios::Plugin.
+
+0.33 5th June 2009
+  - Fixed infinite loop when invalid performance data with multiple = were present
 
 0.32 3rd March 2009
   - Handle performance data with quotes in the label (thanks to Kang)

Modified: branches/upstream/libnagios-plugin-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-plugin-perl/current/META.yml?rev=37639&op=diff
==============================================================================
--- branches/upstream/libnagios-plugin-perl/current/META.yml (original)
+++ branches/upstream/libnagios-plugin-perl/current/META.yml Fri Jun  5 23:25:41 2009
@@ -1,19 +1,30 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         Nagios-Plugin
-version:      0.32
-version_from: lib/Nagios/Plugin/Functions.pm
-installdirs:  site
+--- #YAML:1.0
+name:               Nagios-Plugin
+version:            0.33
+abstract:           A family of perl modules to streamline writing Nagios 
+author:
+    - Nagios Plugin Development Team <nagiosplug-devel at lists.sourceforge.net>
+license:            unknown
+distribution_type:  module
+configure_requires:
+    ExtUtils::MakeMaker:  0
+build_requires:
+    ExtUtils::MakeMaker:  0
 requires:
-    Carp:                          0
-    Class::Accessor:               0
-    Config::Tiny:                  0
-    File::Basename:                0
-    File::Spec:                    0
-    IO::File:                      0
-    Math::Calc::Units:             0
-    Params::Validate:              0
-    Test::More:                    0.62
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.30
+    Carp:               0
+    Class::Accessor:    0
+    Config::Tiny:       0
+    File::Basename:     0
+    File::Spec:         0
+    IO::File:           0
+    Math::Calc::Units:  0
+    Params::Validate:   0
+    Test::More:         0.62
+no_index:
+    directory:
+        - t
+        - inc
+generated_by:       ExtUtils::MakeMaker version 6.50
+meta-spec:
+    url:      http://module-build.sourceforge.net/META-spec-v1.4.html
+    version:  1.4

Modified: branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin.pm?rev=37639&op=diff
==============================================================================
--- branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin.pm (original)
+++ branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin.pm Fri Jun  5 23:25:41 2009
@@ -25,7 +25,7 @@
 # CPAN stupidly won't index this module without a literal $VERSION here,
 #   so we're forced to duplicate it explicitly
 # Make sure you update $Nagios::Plugin::Functions::VERSION too
-our $VERSION = "0.32";
+our $VERSION = "0.33";
 
 sub new {
 	my $class = shift;

Modified: branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin/Functions.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin/Functions.pm?rev=37639&op=diff
==============================================================================
--- branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin/Functions.pm (original)
+++ branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin/Functions.pm Fri Jun  5 23:25:41 2009
@@ -12,7 +12,7 @@
 use Math::Calc::Units;
 
 # Remember to update Nagios::Plugins as well
-our $VERSION = "0.32";
+our $VERSION = "0.33";
 
 our @STATUS_CODES = qw(OK WARNING CRITICAL UNKNOWN DEPENDENT);
 

Modified: branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin/Performance.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin/Performance.pm?rev=37639&op=diff
==============================================================================
--- branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin/Performance.pm (original)
+++ branches/upstream/libnagios-plugin-perl/current/lib/Nagios/Plugin/Performance.pm Fri Jun  5 23:25:41 2009
@@ -87,7 +87,14 @@
 		# If there is more than 1 equals sign, split it out and parse individually
 		if (@{[$perfstring =~ /=/g]} > 1) {
 			$perfstring =~ s/^(.*?=.*?)\s//;
-			$obj = $class->_parse($1);
+			if (defined $1) {
+				$obj = $class->_parse($1);
+			} else {
+				# This could occur if perfdata was soemthing=value=
+				# Since this is invalid, we reset the string and continue
+				$perfstring = "";
+				$obj = $class->_parse($perfstring);
+			}
 		} else {
 			$obj = $class->_parse($perfstring);
 			$perfstring = "";

Modified: branches/upstream/libnagios-plugin-perl/current/t/Nagios-Plugin-Performance.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libnagios-plugin-perl/current/t/Nagios-Plugin-Performance.t?rev=37639&op=diff
==============================================================================
--- branches/upstream/libnagios-plugin-perl/current/t/Nagios-Plugin-Performance.t (original)
+++ branches/upstream/libnagios-plugin-perl/current/t/Nagios-Plugin-Performance.t Fri Jun  5 23:25:41 2009
@@ -1,4 +1,5 @@
 
+use warnings;
 use strict;
 use Test::More;
 use Nagios::Plugin::Functions;
@@ -40,7 +41,7 @@
   },
 );
 
-plan tests => (11 * scalar @test) + 175;
+plan tests => (11 * scalar @test) + 176;
 
 use_ok('Nagios::Plugin::Performance');
 diag "\nusing Nagios::Plugin::Performance revision ". $Nagios::Plugin::Performance::VERSION . "\n" if $ENV{TEST_VERBOSE};
@@ -349,4 +350,7 @@
 is( $p[2]->max, undef, "max ok");
 
 
+ at p = Nagios::Plugin::Performance->parse_perfstring("processes=9;WKFLSV32.exe;9=");
+is_deeply( \@p, [], "Fails parsing correctly");
+
 # add_perfdata tests in t/Nagios-Plugin-01.t




More information about the Pkg-perl-cvs-commits mailing list