From 27c713707b6af759a6cfb83b0fe8272a1bf41f67 Mon Sep 17 00:00:00 2001 From: Thomas Guyot-Sionnest Date: Sat, 17 Nov 2007 06:36:24 +0000 Subject: Fixed handling of repeated ini arguments git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1828 f882894a-f735-0410-b71e-b25c423dba1c diff --git a/Changes b/Changes index dfad56e..1c3b3d4 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl module Nagios::Plugin. +0.22 ??th ??? 200? + - Fixed handling of repeated ini arguments + 0.21 24th September 2007 - Help, usage and version output now goes to stdout, not stderr diff --git a/lib/Nagios/Plugin/Config.pm b/lib/Nagios/Plugin/Config.pm index 92193c2..d565973 100644 --- a/lib/Nagios/Plugin/Config.pm +++ b/lib/Nagios/Plugin/Config.pm @@ -72,9 +72,7 @@ sub read_string # Handle properties if ( /^\s*([^=]+?)\s*=\s*(.*?)\s*$/ ) { - $self->{$ns}->{$1} = defined $self->{$ns}->{$1} ? - [ $self->{$ns}->{$1}, $2 ] : - $2; + push @{$self->{$ns}->{$1}}, $2; next; } -- cgit v0.10-9-g596f