Branch Coverage

blib/lib/DOCSIS/ConfigFile.pm
Criterion Covered Total %
branch 59 68 86.7


line true false branch
31 31 19 ref $_[-1] eq 'HASH' ? :
38 3 47 if (ref $bytes eq "SCALAR")
41 0 3 unless open my $BYTES, "<", $file
43 0 3 unless defined $r
50 35 231 unless my $code = unpack("C", substr($bytes, $pos++, 1))
54 2590 231 unless $code == $current->{$_}{'code'}
60 0 231 unless ($name)
65 16 215 unless ($syminfo->{'lsize'})
74 215 0 $syminfo->{'lsize'} == 1 ? :
82 31 184 if ($syminfo->{'nested'}) { }
184 0 elsif (my $f = 'DOCSIS::ConfigFile::Decode'->can($syminfo->{'func'})) { }
88 10 174 if $name eq "SnmpMibObject"
97 201 14 if (not exists $data->{$name}) { }
4 10 elsif (ref $data->{$name} eq 'ARRAY') { }
120 3 77 if ($args->{'depth'} == 1 and defined $args->{'mta_algorithm'})
126 1170 213 unless defined $data->{$name}
131 50 193 if ($syminfo->{'nested'}) { }
193 0 elsif (my $f = 'DOCSIS::ConfigFile::Encode'->can($syminfo->{'func'})) { }
138 1 192 if ($syminfo->{'func'} =~ /_list$/) { }
10 182 elsif ($name eq 'SnmpMibObject') { }
160 0 241 $syminfo->{'lsize'} == 2 ? :
168 58 19 if $args->{'depth'} != 1
169 3 16 if defined $args->{'mta_algorithm'}
194 2 1 if ($mta_algorithm)
195 1 1 $mta_algorithm eq 'md5' ? :
206 1 212 if $_[1]{'func'} =~ /_list$/
207 6 206 if ref $_[0] eq "ARRAY"
213 148 35 if ($_[1]{'limit'}[1])
214 143 5 if ($_[0] =~ /^-?\d+$/) { }
215 1 142 if $_[1]{'limit'}[1] < $_[0]
216 1 141 if $_[0] < $_[1]{'limit'}[0]
219 1 4 ref $_[0] eq 'ARRAY' ? :
220 0 5 if $_[1]{'limit'}[1] < $length
221 0 5 if $length < $_[1]{'limit'}[0]