Branch Coverage

blib/lib/Nagios/Monitoring/Plugin/Range.pm
Criterion Covered Total %
branch 39 40 97.5


line true false branch
27 2 49 unless $self->is_set
28 1 48 $self->alert_on ? :
31 12 $self->start == 0 ? :
6 43 $self->start_infinity == 1 ? :
3 46 $self->end_infinity == 1 ? :
35 42 179 !defined($self->alert_on) ? :
58 7 197 unless ($string =~ /[\d~]/ and $string =~ /^\@?($Nagios::Monitoring::Plugin::Range::value_re|~)?(:($Nagios::Monitoring::Plugin::Range::value_re)?)?$/)
63 2 195 if ($string =~ s/^\@//)
67 12 185 if ($string =~ s/^~//)
70 53 144 if ($string =~ /^($Nagios::Monitoring::Plugin::Range::value_re)?:/)
72 40 13 if defined $start
77 189 8 if ($string =~ /^($Nagios::Monitoring::Plugin::Range::value_re)$/)
82 184 1 if ($valid and $range->start_infinity == 1 || $range->end_infinity == 1 || $range->start <= $range->end)
93 16 179 if ($self->alert_on == 1)
97 101 94 if ($self->end_infinity == 0 and $self->start_infinity == 0) { }
29 65 elsif ($self->start_infinity == 0 and $self->end_infinity == 1) { }
65 0 elsif ($self->start_infinity == 1 and $self->end_infinity == 0) { }
98 52 49 if ($self->start <= $value and $value <= $self->end) { }
104 14 15 if ($value >= $self->start) { }
110 40 25 if ($value <= $self->end) { }