summaryrefslogtreecommitdiffstats
path: root/lib/Monitoring/Plugin/Getopt.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Monitoring/Plugin/Getopt.pm')
-rw-r--r--lib/Monitoring/Plugin/Getopt.pm12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/Monitoring/Plugin/Getopt.pm b/lib/Monitoring/Plugin/Getopt.pm
index ce1c0f9..ebdd559 100644
--- a/lib/Monitoring/Plugin/Getopt.pm
+++ b/lib/Monitoring/Plugin/Getopt.pm
@@ -1,11 +1,14 @@
1package Monitoring::Plugin::Getopt;
2
1# 3#
2# Monitoring::Plugin::Getopt - OO perl module providing standardised argument 4# Monitoring::Plugin::Getopt - OO perl module providing standardised argument
3# processing for nagios plugins 5# processing for nagios plugins
4# 6#
5 7
6package Monitoring::Plugin::Getopt; 8use 5.006;
7
8use strict; 9use strict;
10use warnings;
11
9use File::Basename; 12use File::Basename;
10use Getopt::Long qw(:config no_ignore_case bundling); 13use Getopt::Long qw(:config no_ignore_case bundling);
11use Carp; 14use Carp;
@@ -249,7 +252,7 @@ sub _load_config_section
249 # TODO: is this check sane? Does --extra-opts=foo require a [foo] section? 252 # TODO: is this check sane? Does --extra-opts=foo require a [foo] section?
250 ## Nevertheless, if we die as UNKNOWN here we should do the same on default 253 ## Nevertheless, if we die as UNKNOWN here we should do the same on default
251 ## file *added eval/_die above*. 254 ## file *added eval/_die above*.
252 $file ||= $Config->np_getfile(); 255 $file ||= $Config->mp_getfile();
253 $self->_die("Invalid section '$section' in config file '$file'") 256 $self->_die("Invalid section '$section' in config file '$file'")
254 unless exists $Config->{$section}; 257 unless exists $Config->{$section};
255 258
@@ -861,7 +864,8 @@ Originally:
861 864
862=head1 COPYRIGHT AND LICENSE 865=head1 COPYRIGHT AND LICENSE
863 866
864Copyright (C) 2006-2014 Monitoring Plugin Development Team 867Copyright (C) 2014 by Monitoring Plugin Team
868Copyright (C) 2006-2014 by Nagios Plugin Development Team
865 869
866This library is free software; you can redistribute it and/or modify 870This library is free software; you can redistribute it and/or modify
867it under the same terms as Perl itself. 871it under the same terms as Perl itself.