Branch Coverage

blib/lib/RFID/EPC/Tag.pm
Criterion Covered Total %
branch 42 56 75.0


line true false branch
347 29 29 if (defined $p{'id'}) { }
29 0 elsif (defined $p{'epc_type'}) { }
352 0 29 unless $$self{'id'} =~ /^[0-9A-F]+$/
448 0 132 if (lc $p eq 'type') { }
132 0 elsif ($p =~ /^epc_/) { }
454 29 103 unless $$self{'_epc_parsed'}
456 0 132 if ($p eq 'epc_all') { }
471 29 0 if (wantarray) { }
496 0 29 unless my $spec = $TAGTYPES{$type}
503 29 0 unless defined $$p{'epc_header'}
514 132 2 defined $$p{$field} ? :
518 0 134 unless $fieldval =~ /^[0-9A-F]*$/
520 74 60 if (length($fieldval) % 2)
526 16 118 if ($field eq 'epc_partition') { }
32 86 elsif ($numbits eq '?') { }
3 83 elsif ($numbits eq '*') { }
530 0 16 unless my $partlist = $$spec{'partitions'}[hex $fieldval]
540 0 32 unless $numbits = $calc_fieldsize{$field}
572 16 216 unless (defined($mask = $$spec{'type_mask'}))
576 29 203 if (($byte1 & $mask) == ($$spec{'type_val'} & $mask))
591 0 29 unless my $spec = $TAGTYPES{$name}
606 32 102 if ($numbits eq '?') { }
3 99 elsif ($numbits eq '*') { }
608 0 32 unless $numbits = $calc_fieldsize{$field}
619 80 54 if ($numbits % 4)
626 68 66 if ($numbits % 8 and $numbits % 8 <= 4)
634 16 118 if ($field eq 'epc_partition')
637 0 16 unless my $partlist = $$spec{'partitions'}[$partition]