summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTon Voon <tonvoon@users.sourceforge.net>2006-08-31 08:19:01 (GMT)
committerTon Voon <tonvoon@users.sourceforge.net>2006-08-31 08:19:01 (GMT)
commit2b422c372ee109303984ca8bac6f5ea3d5976dc0 (patch)
tree6e2d247d164efc18a6bedb5b0c162c3471bab6f6
parenta70a6ff5acf2a2b252328427293801ce0ff42888 (diff)
downloadmonitoring-plugin-perl-2b422c372ee109303984ca8bac6f5ea3d5976dc0.tar.gz
Consistent version numbers across all modules. Inherited from Nagios::Plugin::Base
git-svn-id: https://nagiosplug.svn.sourceforge.net/svnroot/nagiosplug/Nagios-Plugin/trunk@1471 f882894a-f735-0410-b71e-b25c423dba1c
-rw-r--r--Changes1
-rw-r--r--META.yml4
-rw-r--r--Makefile.PL2
-rw-r--r--lib/Nagios/Plugin.pm2
-rw-r--r--lib/Nagios/Plugin/Base.pm3
-rw-r--r--lib/Nagios/Plugin/Getopt.pm3
-rw-r--r--lib/Nagios/Plugin/Performance.pm4
-rw-r--r--lib/Nagios/Plugin/Range.pm4
-rw-r--r--lib/Nagios/Plugin/Threshold.pm3
-rw-r--r--t/Nagios-Plugin-Base.t14
10 files changed, 27 insertions, 13 deletions
diff --git a/Changes b/Changes
index 8bf43f1..e377a45 100644
--- a/Changes
+++ b/Changes
@@ -2,6 +2,7 @@ Revision history for Perl module Nagios::Plugin.
2 2
30.13 ??? 30.13 ???
4 - Lots of extra tests and fixes from Nathan Vonnahme 4 - Lots of extra tests and fixes from Nathan Vonnahme
5 - Nagios::Plugin::Getopt added by Gavin Carr
5 6
60.12 15th June 2006 70.12 15th June 2006
7 - rrdlabel method available to get a performance label, 8 - rrdlabel method available to get a performance label,
diff --git a/META.yml b/META.yml
index b850b3f..2b98bd5 100644
--- a/META.yml
+++ b/META.yml
@@ -1,8 +1,8 @@
1# http://module-build.sourceforge.net/META-spec.html 1# http://module-build.sourceforge.net/META-spec.html
2#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# 2#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
3name: Nagios-Plugin 3name: Nagios-Plugin
4version: 0.12 4version: 0.13
5version_from: lib/Nagios/Plugin.pm 5version_from: lib/Nagios/Plugin/Base.pm
6installdirs: site 6installdirs: site
7requires: 7requires:
8 8
diff --git a/Makefile.PL b/Makefile.PL
index c10568c..0e3ad73 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -4,7 +4,7 @@ use ExtUtils::MakeMaker;
4# the contents of the Makefile that is written. 4# the contents of the Makefile that is written.
5WriteMakefile( 5WriteMakefile(
6 NAME => 'Nagios::Plugin', 6 NAME => 'Nagios::Plugin',
7 VERSION_FROM => 'lib/Nagios/Plugin.pm', # finds $VERSION 7 VERSION_FROM => 'lib/Nagios/Plugin/Base.pm', # finds $VERSION
8 PREREQ_PM => {}, # e.g., Module::Name => 1.1 8 PREREQ_PM => {}, # e.g., Module::Name => 1.1
9 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 9 ($] >= 5.005 ? ## Add these new keywords supported since 5.005
10 (ABSTRACT_FROM => 'lib/Nagios/Plugin.pm', # retrieve abstract from module 10 (ABSTRACT_FROM => 'lib/Nagios/Plugin.pm', # retrieve abstract from module
diff --git a/lib/Nagios/Plugin.pm b/lib/Nagios/Plugin.pm
index 4e95e98..c14dfa6 100644
--- a/lib/Nagios/Plugin.pm
+++ b/lib/Nagios/Plugin.pm
@@ -23,7 +23,7 @@ use Exporter;
23our @ISA = qw(Exporter Nagios::__::Plugin); 23our @ISA = qw(Exporter Nagios::__::Plugin);
24our @EXPORT_OK = qw(%ERRORS); 24our @EXPORT_OK = qw(%ERRORS);
25 25
26our $VERSION = '0.13'; 26our $VERSION = $Nagios::Plugin::Base::VERSION;
27 27
28sub add_perfdata { 28sub add_perfdata {
29 my ($self, %args) = @_; 29 my ($self, %args) = @_;
diff --git a/lib/Nagios/Plugin/Base.pm b/lib/Nagios/Plugin/Base.pm
index d1678a5..c2e9902 100644
--- a/lib/Nagios/Plugin/Base.pm
+++ b/lib/Nagios/Plugin/Base.pm
@@ -5,8 +5,7 @@ package Nagios::Plugin::Base;
5use strict; 5use strict;
6use warnings; 6use warnings;
7 7
8use Nagios::Plugin; 8our $VERSION = "0.13";
9our ($VERSION) = $Nagios::Plugin::VERSION;
10 9
11use Exporter; 10use Exporter;
12our @ISA = qw(Exporter); 11our @ISA = qw(Exporter);
diff --git a/lib/Nagios/Plugin/Getopt.pm b/lib/Nagios/Plugin/Getopt.pm
index dedf92c..d291b2f 100644
--- a/lib/Nagios/Plugin/Getopt.pm
+++ b/lib/Nagios/Plugin/Getopt.pm
@@ -13,8 +13,9 @@ use Carp;
13use Params::Validate qw(:all); 13use Params::Validate qw(:all);
14use base qw(Class::Accessor); 14use base qw(Class::Accessor);
15 15
16use Nagios::Plugin::Base;
16use vars qw($VERSION); 17use vars qw($VERSION);
17$VERSION = '0.02'; 18$VERSION = $Nagios::Plugin::Base::VERSION;
18 19
19# Standard defaults 20# Standard defaults
20my %DEFAULT = ( 21my %DEFAULT = (
diff --git a/lib/Nagios/Plugin/Performance.pm b/lib/Nagios/Plugin/Performance.pm
index 2af22bd..83c92fb 100644
--- a/lib/Nagios/Plugin/Performance.pm
+++ b/lib/Nagios/Plugin/Performance.pm
@@ -7,8 +7,8 @@ use warnings;
7 7
8use Carp; 8use Carp;
9use Nagios::Plugin::Threshold; 9use Nagios::Plugin::Threshold;
10use Nagios::Plugin; 10use Nagios::Plugin::Base;
11our ($VERSION) = $Nagios::Plugin::VERSION; 11our ($VERSION) = $Nagios::Plugin::Base::VERSION;
12 12
13use Class::Struct; 13use Class::Struct;
14struct "Nagios::Plugin::Performance" => { 14struct "Nagios::Plugin::Performance" => {
diff --git a/lib/Nagios/Plugin/Range.pm b/lib/Nagios/Plugin/Range.pm
index c0c47e4..b17cc96 100644
--- a/lib/Nagios/Plugin/Range.pm
+++ b/lib/Nagios/Plugin/Range.pm
@@ -6,8 +6,8 @@ use strict;
6use warnings; 6use warnings;
7use Carp; 7use Carp;
8 8
9use Nagios::Plugin; 9use Nagios::Plugin::Base;
10our ($VERSION) = $Nagios::Plugin::VERSION; 10our ($VERSION) = $Nagios::Plugin::Base::VERSION;
11 11
12use overload 12use overload
13 '""' => sub { shift->stringify }; 13 '""' => sub { shift->stringify };
diff --git a/lib/Nagios/Plugin/Threshold.pm b/lib/Nagios/Plugin/Threshold.pm
index 494383f..f3410e8 100644
--- a/lib/Nagios/Plugin/Threshold.pm
+++ b/lib/Nagios/Plugin/Threshold.pm
@@ -7,8 +7,7 @@ use warnings;
7 7
8use Nagios::Plugin::Range; 8use Nagios::Plugin::Range;
9use Nagios::Plugin::Base; 9use Nagios::Plugin::Base;
10use Nagios::Plugin; 10our ($VERSION) = $Nagios::Plugin::Base::VERSION;
11our ($VERSION) = $Nagios::Plugin::VERSION;
12 11
13use Class::Struct; 12use Class::Struct;
14struct "Nagios::Plugin::Threshold" => { 13struct "Nagios::Plugin::Threshold" => {
diff --git a/t/Nagios-Plugin-Base.t b/t/Nagios-Plugin-Base.t
new file mode 100644
index 0000000..589f331
--- /dev/null
+++ b/t/Nagios-Plugin-Base.t
@@ -0,0 +1,14 @@
1
2use strict;
3use Test::More tests => 11;
4
5use_ok("Nagios::Plugin::Base");
6my $this_version=$Nagios::Plugin::Base::VERSION;
7foreach my $m ("", qw(::Threshold ::Getopt ::Performance ::Range)) {
8 my $mod = "Nagios::Plugin$m";
9 use_ok($mod);
10 # Lots of hackery below. Easier to say $mod->VERSION, but this is probably a recent perl thing
11 my $v = "$mod"."::VERSION";
12 my $a = eval "\$$v";
13 is($a, $this_version, "Version number for $mod the same as Base: $this_version");
14}