From 2b422c372ee109303984ca8bac6f5ea3d5976dc0 Mon Sep 17 00:00:00 2001 From: Ton Voon Date: Thu, 31 Aug 2006 08:19:01 +0000 Subject: 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 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. 0.13 ??? - Lots of extra tests and fixes from Nathan Vonnahme + - Nagios::Plugin::Getopt added by Gavin Carr 0.12 15th June 2006 - 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 @@ # http://module-build.sourceforge.net/META-spec.html #XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX# name: Nagios-Plugin -version: 0.12 -version_from: lib/Nagios/Plugin.pm +version: 0.13 +version_from: lib/Nagios/Plugin/Base.pm installdirs: site requires: 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; # the contents of the Makefile that is written. WriteMakefile( NAME => 'Nagios::Plugin', - VERSION_FROM => 'lib/Nagios/Plugin.pm', # finds $VERSION + VERSION_FROM => 'lib/Nagios/Plugin/Base.pm', # finds $VERSION PREREQ_PM => {}, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (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; our @ISA = qw(Exporter Nagios::__::Plugin); our @EXPORT_OK = qw(%ERRORS); -our $VERSION = '0.13'; +our $VERSION = $Nagios::Plugin::Base::VERSION; sub add_perfdata { 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; use strict; use warnings; -use Nagios::Plugin; -our ($VERSION) = $Nagios::Plugin::VERSION; +our $VERSION = "0.13"; use Exporter; our @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; use Params::Validate qw(:all); use base qw(Class::Accessor); +use Nagios::Plugin::Base; use vars qw($VERSION); -$VERSION = '0.02'; +$VERSION = $Nagios::Plugin::Base::VERSION; # Standard defaults my %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; use Carp; use Nagios::Plugin::Threshold; -use Nagios::Plugin; -our ($VERSION) = $Nagios::Plugin::VERSION; +use Nagios::Plugin::Base; +our ($VERSION) = $Nagios::Plugin::Base::VERSION; use Class::Struct; struct "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; use warnings; use Carp; -use Nagios::Plugin; -our ($VERSION) = $Nagios::Plugin::VERSION; +use Nagios::Plugin::Base; +our ($VERSION) = $Nagios::Plugin::Base::VERSION; use overload '""' => 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; use Nagios::Plugin::Range; use Nagios::Plugin::Base; -use Nagios::Plugin; -our ($VERSION) = $Nagios::Plugin::VERSION; +our ($VERSION) = $Nagios::Plugin::Base::VERSION; use Class::Struct; struct "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 @@ + +use strict; +use Test::More tests => 11; + +use_ok("Nagios::Plugin::Base"); +my $this_version=$Nagios::Plugin::Base::VERSION; +foreach my $m ("", qw(::Threshold ::Getopt ::Performance ::Range)) { + my $mod = "Nagios::Plugin$m"; + use_ok($mod); + # Lots of hackery below. Easier to say $mod->VERSION, but this is probably a recent perl thing + my $v = "$mod"."::VERSION"; + my $a = eval "\$$v"; + is($a, $this_version, "Version number for $mod the same as Base: $this_version"); +} -- cgit v0.10-9-g596f