App-nrun

 view release on metacpan or  search on metacpan

lib/NRun/Checks/CheckNull.pm  view on Meta::CPAN

###
# this check does nothing.
###

package NRun::Checks::CheckNull;

use strict;
use warnings;

use File::Basename;
use NRun::Check;
use Net::Ping;

our @ISA = qw(NRun::Check);

BEGIN {

    NRun::Check::register ( {

        'CHECK' => "null",
        'DESC'  => "do nothing",
        'NAME'  => __PACKAGE__,
    } );
}

###
# create a new object.
#
# <- the new object
sub new {

    my $_pkg = shift;
    my $_cfg = shift;

    my $self = {};
    bless $self, $_pkg;

    return $self;
}

###
# initialize this check module.
#
# $_cfg - parameter hash where
# {
#   'hostname' - hostname this check should act on
# }
sub init {

    my $_self = shift;
    my $_cfg  = shift;

    $_self->{hostname} = $_cfg->{hostname};
}

###
# execute the check on $_self->{hostname}.
#
# on error, the following string will be printed on stderr:
#
# HOSTNAME;stderr;PID;n/a;error;"OUTPUT"
#
# <- 1 on success and 0 on error
sub execute {

    my $_self = shift;

    return 1;
}

1;



( run in 1.759 second using v1.01-cache-2.11-cpan-d8267643d1d )