summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorSven Nierlein <sven@nierlein.de>2014-01-20 14:49:14 +0100
committerSven Nierlein <sven@nierlein.de>2014-01-20 14:49:14 +0100
commitdfae38b656242898ce962c9ad93ed66be45fc3d4 (patch)
treed781a2ff90888c08379ebcd45f8ec51dda324882 /lib
parentb418181dfe80dd75169b6e8a619ac1932155dea2 (diff)
downloadmonitoring-plugin-perl-dfae38b656242898ce962c9ad93ed66be45fc3d4.tar.gz
keep the old name in copyright for more transparencyv0.37
Signed-off-by: Sven Nierlein <sven@nierlein.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/Monitoring/Plugin.pm5
-rw-r--r--lib/Monitoring/Plugin/Config.pm10
-rw-r--r--lib/Monitoring/Plugin/ExitResult.pm9
-rw-r--r--lib/Monitoring/Plugin/Functions.pm9
-rw-r--r--lib/Monitoring/Plugin/Getopt.pm12
-rw-r--r--lib/Monitoring/Plugin/Performance.pm4
-rw-r--r--lib/Monitoring/Plugin/Range.pm4
-rw-r--r--lib/Monitoring/Plugin/Threshold.pm4
8 files changed, 36 insertions, 21 deletions
diff --git a/lib/Monitoring/Plugin.pm b/lib/Monitoring/Plugin.pm
index f9eb49e..a5b51b1 100644
--- a/lib/Monitoring/Plugin.pm
+++ b/lib/Monitoring/Plugin.pm
@@ -1,9 +1,9 @@
1
2package Monitoring::Plugin; 1package Monitoring::Plugin;
3 2
4use Monitoring::Plugin::Functions qw(:codes %ERRORS %STATUS_TEXT @STATUS_CODES); 3use Monitoring::Plugin::Functions qw(:codes %ERRORS %STATUS_TEXT @STATUS_CODES);
5use Params::Validate qw(:all); 4use Params::Validate qw(:all);
6 5
6use 5.006;
7use strict; 7use strict;
8use warnings; 8use warnings;
9 9
@@ -703,7 +703,8 @@ Originally by Ton Voon, E<lt>ton.voon@altinity.comE<gt>.
703 703
704=head1 COPYRIGHT AND LICENSE 704=head1 COPYRIGHT AND LICENSE
705 705
706Copyright (C) 2006-2014 by Monitoring Plugin Team 706Copyright (C) 2014 by Monitoring Plugin Team
707Copyright (C) 2006-2014 by Nagios Plugin Development Team
707 708
708This library is free software; you can redistribute it and/or modify it 709This library is free software; you can redistribute it and/or modify it
709under the same terms as Perl itself, either Perl version 5.8.4 or, at your 710under the same terms as Perl itself, either Perl version 5.8.4 or, at your
diff --git a/lib/Monitoring/Plugin/Config.pm b/lib/Monitoring/Plugin/Config.pm
index 5e941d4..fe2b654 100644
--- a/lib/Monitoring/Plugin/Config.pm
+++ b/lib/Monitoring/Plugin/Config.pm
@@ -1,6 +1,9 @@
1package Monitoring::Plugin::Config; 1package Monitoring::Plugin::Config;
2 2
3use 5.006;
3use strict; 4use strict;
5use warnings;
6
4use Carp; 7use Carp;
5use File::Spec; 8use File::Spec;
6use base qw(Config::Tiny); 9use base qw(Config::Tiny);
@@ -93,10 +96,12 @@ sub read_string
93sub write { croak "Write access not permitted" } 96sub write { croak "Write access not permitted" }
94 97
95# Return last file used by read(); 98# Return last file used by read();
96sub np_getfile { return $CURRENT_FILE; } 99sub mp_getfile { return $CURRENT_FILE; }
97 100
981; 1011;
99 102
103__END__
104
100=head1 NAME 105=head1 NAME
101 106
102Monitoring::Plugin::Config - read nagios plugin .ini style config files 107Monitoring::Plugin::Config - read nagios plugin .ini style config files
@@ -169,7 +174,8 @@ https://monitoring-plugins.org
169 174
170=head1 COPYRIGHT AND LICENSE 175=head1 COPYRIGHT AND LICENSE
171 176
172Copyright (C) 2006-2014 Monitoring Plugin Development Team 177Copyright (C) 2014 by Monitoring Plugin Team
178Copyright (C) 2006-2014 by Nagios Plugin Development Team
173 179
174This library is free software; you can redistribute it and/or modify 180This library is free software; you can redistribute it and/or modify
175it under the same terms as Perl itself. 181it under the same terms as Perl itself.
diff --git a/lib/Monitoring/Plugin/ExitResult.pm b/lib/Monitoring/Plugin/ExitResult.pm
index aa9f5da..ab79a19 100644
--- a/lib/Monitoring/Plugin/ExitResult.pm
+++ b/lib/Monitoring/Plugin/ExitResult.pm
@@ -1,8 +1,10 @@
1# Tiny helper class to return both output and return_code when testing
2
3package Monitoring::Plugin::ExitResult; 1package Monitoring::Plugin::ExitResult;
4 2
3# Tiny helper class to return both output and return_code when testing
4
5use 5.006;
5use strict; 6use strict;
7use warnings;
6 8
7# Stringify to message 9# Stringify to message
8use overload '""' => sub { shift->{message} }; 10use overload '""' => sub { shift->{message} };
@@ -63,7 +65,8 @@ Originally:
63 65
64=head1 COPYRIGHT AND LICENSE 66=head1 COPYRIGHT AND LICENSE
65 67
66Copyright (C) 2006-2014 Monitoring Plugin Development Team 68Copyright (C) 2014 by Monitoring Plugin Team
69Copyright (C) 2006-2014 by Nagios Plugin Development Team
67 70
68This library is free software; you can redistribute it and/or modify 71This library is free software; you can redistribute it and/or modify
69it under the same terms as Perl itself. 72it under the same terms as Perl itself.
diff --git a/lib/Monitoring/Plugin/Functions.pm b/lib/Monitoring/Plugin/Functions.pm
index d2856e8..d362f9c 100644
--- a/lib/Monitoring/Plugin/Functions.pm
+++ b/lib/Monitoring/Plugin/Functions.pm
@@ -1,12 +1,12 @@
1package Monitoring::Plugin::Functions;
2
1# Functional interface to basic Monitoring::Plugin constants, exports, 3# Functional interface to basic Monitoring::Plugin constants, exports,
2# and functions 4# and functions
3 5
4package Monitoring::Plugin::Functions;
5
6use 5.006; 6use 5.006;
7
8use strict; 7use strict;
9use warnings; 8use warnings;
9
10use File::Basename; 10use File::Basename;
11use Params::Validate qw(:types validate); 11use Params::Validate qw(:types validate);
12use Math::Calc::Units; 12use Math::Calc::Units;
@@ -437,7 +437,8 @@ https://monitoring-plugins.org
437 437
438=head1 COPYRIGHT AND LICENSE 438=head1 COPYRIGHT AND LICENSE
439 439
440Copyright (C) 2006-2014 Monitoring Plugin Development Team 440Copyright (C) 2014 by Monitoring Plugin Team
441Copyright (C) 2006-2014 by Nagios Plugin Development Team
441 442
442This library is free software; you can redistribute it and/or modify 443This library is free software; you can redistribute it and/or modify
443it under the same terms as Perl itself. 444it under the same terms as Perl itself.
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.
diff --git a/lib/Monitoring/Plugin/Performance.pm b/lib/Monitoring/Plugin/Performance.pm
index 90fc9f4..f1e7a16 100644
--- a/lib/Monitoring/Plugin/Performance.pm
+++ b/lib/Monitoring/Plugin/Performance.pm
@@ -1,7 +1,6 @@
1package Monitoring::Plugin::Performance; 1package Monitoring::Plugin::Performance;
2 2
3use 5.006; 3use 5.006;
4
5use strict; 4use strict;
6use warnings; 5use warnings;
7 6
@@ -286,7 +285,8 @@ https://monitoring-plugins.org
286 285
287=head1 COPYRIGHT AND LICENSE 286=head1 COPYRIGHT AND LICENSE
288 287
289Copyright (C) 2006-2014 Monitoring Plugin Development Team 288Copyright (C) 2014 by Monitoring Plugin Team
289Copyright (C) 2006-2014 by Nagios Plugin Development Team
290 290
291This library is free software; you can redistribute it and/or modify 291This library is free software; you can redistribute it and/or modify
292it under the same terms as Perl itself. 292it under the same terms as Perl itself.
diff --git a/lib/Monitoring/Plugin/Range.pm b/lib/Monitoring/Plugin/Range.pm
index af19577..4cacfd4 100644
--- a/lib/Monitoring/Plugin/Range.pm
+++ b/lib/Monitoring/Plugin/Range.pm
@@ -1,7 +1,6 @@
1package Monitoring::Plugin::Range; 1package Monitoring::Plugin::Range;
2 2
3use 5.006; 3use 5.006;
4
5use strict; 4use strict;
6use warnings; 5use warnings;
7 6
@@ -161,7 +160,8 @@ https://monitoring-plugins.org
161 160
162=head1 COPYRIGHT AND LICENSE 161=head1 COPYRIGHT AND LICENSE
163 162
164Copyright (C) 2006-2014 Monitoring Plugin Development Team 163Copyright (C) 2014 by Monitoring Plugin Team
164Copyright (C) 2006-2014 by Nagios Plugin Development Team
165 165
166This library is free software; you can redistribute it and/or modify 166This library is free software; you can redistribute it and/or modify
167it under the same terms as Perl itself. 167it under the same terms as Perl itself.
diff --git a/lib/Monitoring/Plugin/Threshold.pm b/lib/Monitoring/Plugin/Threshold.pm
index e71e21b..06dbf0c 100644
--- a/lib/Monitoring/Plugin/Threshold.pm
+++ b/lib/Monitoring/Plugin/Threshold.pm
@@ -1,7 +1,6 @@
1package Monitoring::Plugin::Threshold; 1package Monitoring::Plugin::Threshold;
2 2
3use 5.006; 3use 5.006;
4
5use strict; 4use strict;
6use warnings; 5use warnings;
7 6
@@ -126,7 +125,8 @@ https://monitoring-plugins.org
126 125
127=head1 COPYRIGHT AND LICENSE 126=head1 COPYRIGHT AND LICENSE
128 127
129Copyright (C) 2006-2014 Monitoring Plugin Development Team 128Copyright (C) 2014 by Monitoring Plugin Team
129Copyright (C) 2006-2014 by Nagios Plugin Development Team
130 130
131This library is free software; you can redistribute it and/or modify 131This library is free software; you can redistribute it and/or modify
132it under the same terms as Perl itself. 132it under the same terms as Perl itself.