Branch Coverage

blib/lib/DOCSIS/ConfigFile.pm
Criterion Covered Total %
branch 60 70 85.7


line true false branch
32 31 19 ref $_[-1] eq 'HASH' ? :
39 3 47 if (ref $bytes eq "SCALAR")
42 0 3 unless open my $BYTES, "<", $file
44 0 3 unless defined $r
52 35 231 unless my $code = unpack("C", substr($bytes, $pos++, 1))
56 2570 231 unless $code == $current->{$_}{'code'}
62 0 231 unless ($name)
67 16 215 unless ($syminfo->{'lsize'})
76 215 0 $syminfo->{'lsize'} == 1 ? :
84 31 184 if ($syminfo->{'nested'}) { }
184 0 elsif (my $f = 'DOCSIS::ConfigFile::Decode'->can($syminfo->{'func'})) { }
90 10 174 if $name eq "SnmpMibObject"
99 201 14 if (not exists $data->{$name}) { }
4 10 elsif (ref $data->{$name} eq 'ARRAY') { }
122 3 77 if ($options->{'depth'} == 1 and defined $options->{'mta_algorithm'})
128 1170 213 unless defined $data->{$name}
133 50 193 if ($syminfo->{'nested'}) { }
193 0 elsif (my $f = 'DOCSIS::ConfigFile::Encode'->can($syminfo->{'func'})) { }
140 1 192 if ($syminfo->{'func'} =~ /_list$/) { }
10 182 elsif ($name eq 'SnmpMibObject') { }
162 0 241 $syminfo->{'lsize'} == 2 ? :
170 58 19 if $options->{'depth'} != 1
171 3 16 if defined $options->{'mta_algorithm'}
196 2 1 if ($mta_algorithm)
197 0 2 unless $mta_algorithm =~ /^(md5|sha1)$/
199 1 1 $mta_algorithm eq 'md5' ? :
210 1 212 if $_[1]{'func'} =~ /_list$/
211 6 206 if ref $_[0] eq "ARRAY"
217 148 35 if ($_[1]{'limit'}[1])
218 143 5 if ($_[0] =~ /^-?\d+$/) { }
219 1 142 if $_[1]{'limit'}[1] < $_[0]
220 1 141 if $_[0] < $_[1]{'limit'}[0]
223 1 4 ref $_[0] eq 'ARRAY' ? :
224 0 5 if $_[1]{'limit'}[1] < $length
225 0 5 if $length < $_[1]{'limit'}[0]