diff options
| author | Ton Voon <tonvoon@users.sourceforge.net> | 2006-08-31 08:19:01 +0000 | 
|---|---|---|
| committer | Ton Voon <tonvoon@users.sourceforge.net> | 2006-08-31 08:19:01 +0000 | 
| commit | 2b422c372ee109303984ca8bac6f5ea3d5976dc0 (patch) | |
| tree | 6e2d247d164efc18a6bedb5b0c162c3471bab6f6 | |
| parent | a70a6ff5acf2a2b252328427293801ce0ff42888 (diff) | |
| download | monitoring-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-- | Changes | 1 | ||||
| -rw-r--r-- | META.yml | 4 | ||||
| -rw-r--r-- | Makefile.PL | 2 | ||||
| -rw-r--r-- | lib/Nagios/Plugin.pm | 2 | ||||
| -rw-r--r-- | lib/Nagios/Plugin/Base.pm | 3 | ||||
| -rw-r--r-- | lib/Nagios/Plugin/Getopt.pm | 3 | ||||
| -rw-r--r-- | lib/Nagios/Plugin/Performance.pm | 4 | ||||
| -rw-r--r-- | lib/Nagios/Plugin/Range.pm | 4 | ||||
| -rw-r--r-- | lib/Nagios/Plugin/Threshold.pm | 3 | ||||
| -rw-r--r-- | t/Nagios-Plugin-Base.t | 14 | 
10 files changed, 27 insertions, 13 deletions
| @@ -2,6 +2,7 @@ Revision history for Perl module Nagios::Plugin. | |||
| 2 | 2 | ||
| 3 | 0.13 ??? | 3 | 0.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 | ||
| 6 | 0.12 15th June 2006 | 7 | 0.12 15th June 2006 | 
| 7 | - rrdlabel method available to get a performance label, | 8 | - rrdlabel method available to get a performance label, | 
| @@ -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# | 
| 3 | name: Nagios-Plugin | 3 | name: Nagios-Plugin | 
| 4 | version: 0.12 | 4 | version: 0.13 | 
| 5 | version_from: lib/Nagios/Plugin.pm | 5 | version_from: lib/Nagios/Plugin/Base.pm | 
| 6 | installdirs: site | 6 | installdirs: site | 
| 7 | requires: | 7 | requires: | 
| 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. | 
| 5 | WriteMakefile( | 5 | WriteMakefile( | 
| 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; | |||
| 23 | our @ISA = qw(Exporter Nagios::__::Plugin); | 23 | our @ISA = qw(Exporter Nagios::__::Plugin); | 
| 24 | our @EXPORT_OK = qw(%ERRORS); | 24 | our @EXPORT_OK = qw(%ERRORS); | 
| 25 | 25 | ||
| 26 | our $VERSION = '0.13'; | 26 | our $VERSION = $Nagios::Plugin::Base::VERSION; | 
| 27 | 27 | ||
| 28 | sub add_perfdata { | 28 | sub 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; | |||
| 5 | use strict; | 5 | use strict; | 
| 6 | use warnings; | 6 | use warnings; | 
| 7 | 7 | ||
| 8 | use Nagios::Plugin; | 8 | our $VERSION = "0.13"; | 
| 9 | our ($VERSION) = $Nagios::Plugin::VERSION; | ||
| 10 | 9 | ||
| 11 | use Exporter; | 10 | use Exporter; | 
| 12 | our @ISA = qw(Exporter); | 11 | 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; | |||
| 13 | use Params::Validate qw(:all); | 13 | use Params::Validate qw(:all); | 
| 14 | use base qw(Class::Accessor); | 14 | use base qw(Class::Accessor); | 
| 15 | 15 | ||
| 16 | use Nagios::Plugin::Base; | ||
| 16 | use vars qw($VERSION); | 17 | use vars qw($VERSION); | 
| 17 | $VERSION = '0.02'; | 18 | $VERSION = $Nagios::Plugin::Base::VERSION; | 
| 18 | 19 | ||
| 19 | # Standard defaults | 20 | # Standard defaults | 
| 20 | my %DEFAULT = ( | 21 | 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; | |||
| 7 | 7 | ||
| 8 | use Carp; | 8 | use Carp; | 
| 9 | use Nagios::Plugin::Threshold; | 9 | use Nagios::Plugin::Threshold; | 
| 10 | use Nagios::Plugin; | 10 | use Nagios::Plugin::Base; | 
| 11 | our ($VERSION) = $Nagios::Plugin::VERSION; | 11 | our ($VERSION) = $Nagios::Plugin::Base::VERSION; | 
| 12 | 12 | ||
| 13 | use Class::Struct; | 13 | use Class::Struct; | 
| 14 | struct "Nagios::Plugin::Performance" => { | 14 | 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; | |||
| 6 | use warnings; | 6 | use warnings; | 
| 7 | use Carp; | 7 | use Carp; | 
| 8 | 8 | ||
| 9 | use Nagios::Plugin; | 9 | use Nagios::Plugin::Base; | 
| 10 | our ($VERSION) = $Nagios::Plugin::VERSION; | 10 | our ($VERSION) = $Nagios::Plugin::Base::VERSION; | 
| 11 | 11 | ||
| 12 | use overload | 12 | use 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 | ||
| 8 | use Nagios::Plugin::Range; | 8 | use Nagios::Plugin::Range; | 
| 9 | use Nagios::Plugin::Base; | 9 | use Nagios::Plugin::Base; | 
| 10 | use Nagios::Plugin; | 10 | our ($VERSION) = $Nagios::Plugin::Base::VERSION; | 
| 11 | our ($VERSION) = $Nagios::Plugin::VERSION; | ||
| 12 | 11 | ||
| 13 | use Class::Struct; | 12 | use Class::Struct; | 
| 14 | struct "Nagios::Plugin::Threshold" => { | 13 | 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 @@ | |||
| 1 | |||
| 2 | use strict; | ||
| 3 | use Test::More tests => 11; | ||
| 4 | |||
| 5 | use_ok("Nagios::Plugin::Base"); | ||
| 6 | my $this_version=$Nagios::Plugin::Base::VERSION; | ||
| 7 | foreach 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 | } | ||
