diff options
author | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-11-17 06:36:24 +0000 |
---|---|---|
committer | Thomas Guyot-Sionnest <dermoth@users.sourceforge.net> | 2007-11-17 06:36:24 +0000 |
commit | 27c713707b6af759a6cfb83b0fe8272a1bf41f67 (patch) | |
tree | 4a9b3b6cdbbbbc8c168a35422d404951d8954ea1 | |
parent | 7cacaad0c413f202fa4094567fa53b2c7ee01a54 (diff) | |
download | monitoring-plugin-perl-27c713707b6af759a6cfb83b0fe8272a1bf41f67.tar.gz |
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
-rw-r--r-- | Changes | 3 | ||||
-rw-r--r-- | lib/Nagios/Plugin/Config.pm | 4 |
2 files changed, 4 insertions, 3 deletions
@@ -1,5 +1,8 @@ | |||
1 | Revision history for Perl module Nagios::Plugin. | 1 | Revision history for Perl module Nagios::Plugin. |
2 | 2 | ||
3 | 0.22 ??th ??? 200? | ||
4 | - Fixed handling of repeated ini arguments | ||
5 | |||
3 | 0.21 24th September 2007 | 6 | 0.21 24th September 2007 |
4 | - Help, usage and version output now goes to stdout, not stderr | 7 | - Help, usage and version output now goes to stdout, not stderr |
5 | 8 | ||
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 | |||
72 | 72 | ||
73 | # Handle properties | 73 | # Handle properties |
74 | if ( /^\s*([^=]+?)\s*=\s*(.*?)\s*$/ ) { | 74 | if ( /^\s*([^=]+?)\s*=\s*(.*?)\s*$/ ) { |
75 | $self->{$ns}->{$1} = defined $self->{$ns}->{$1} ? | 75 | push @{$self->{$ns}->{$1}}, $2; |
76 | [ $self->{$ns}->{$1}, $2 ] : | ||
77 | $2; | ||
78 | next; | 76 | next; |
79 | } | 77 | } |
80 | 78 | ||