File Coverage

blib/lib/Monitoring/GLPlugin/Item.pm
Criterion Covered Total %
statement 3 19 15.7
branch 0 4 0.0
condition n/a
subroutine 1 3 33.3
pod 0 2 0.0
total 4 28 14.2


line stmt bran cond sub pod time code
1             package Monitoring::GLPlugin::Item;
2             our @ISA = qw(Monitoring::GLPlugin);
3              
4 5     5   54 use strict;
  5         10  
  5         739  
5              
6             sub new {
7 0     0 0   my ($class, %params) = @_;
8 0           my $self = {
9             blacklisted => 0,
10             info => undef,
11             extendedinfo => undef,
12             };
13 0           bless $self, $class;
14 0           $self->init(%params);
15 0           return $self;
16             }
17              
18             sub check {
19 0     0 0   my ($self, $lists) = @_;
20 0 0         my @lists = $lists ? @{$lists} : grep { ref($self->{$_}) eq "ARRAY" } keys %{$self};
  0            
  0            
  0            
21 0           foreach my $list (@lists) {
22 0           $self->add_info('checking '.$list);
23 0           foreach my $element (@{$self->{$list}}) {
  0            
24 0 0         $element->blacklist() if $self->is_blacklisted();
25 0           $element->check();
26             }
27             }
28             }
29              
30             1;
31              
32             __END__