diff options
Diffstat (limited to 'lib/Monitoring/Plugin/Getopt.pm')
| -rw-r--r-- | lib/Monitoring/Plugin/Getopt.pm | 12 |
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 @@ | |||
| 1 | package 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 | ||
| 6 | package Monitoring::Plugin::Getopt; | 8 | use 5.006; |
| 7 | |||
| 8 | use strict; | 9 | use strict; |
| 10 | use warnings; | ||
| 11 | |||
| 9 | use File::Basename; | 12 | use File::Basename; |
| 10 | use Getopt::Long qw(:config no_ignore_case bundling); | 13 | use Getopt::Long qw(:config no_ignore_case bundling); |
| 11 | use Carp; | 14 | use 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 | ||
| 864 | Copyright (C) 2006-2014 Monitoring Plugin Development Team | 867 | Copyright (C) 2014 by Monitoring Plugin Team |
| 868 | Copyright (C) 2006-2014 by Nagios Plugin Development Team | ||
| 865 | 869 | ||
| 866 | This library is free software; you can redistribute it and/or modify | 870 | This library is free software; you can redistribute it and/or modify |
| 867 | it under the same terms as Perl itself. | 871 | it under the same terms as Perl itself. |
