Branch Coverage

lib/Net/HL7/Message.pm
Criterion Covered Total %
branch 47 54 87.0


line true false branch
98 2 21 unless $self->_init(@_)
123 11 12 if ($hl7str)
136 1 10 if ($fldSep ne $fldSepCtrl)
163 10 72 if ($i == 0 and $j == 0)
175 47 3 if (@subComps <= 1) { }
184 66 6 if (@comps <= 1) { }
197 18 1 if ($name =~ /^[A-Z][A-Z0-9]{2}$/)
205 10 9 if ($segClass and eval "require $segClass;") { }
213 1 18 unless $seg
236 22 20 if (@{$$self{'SEGMENTS'};} == 0)
258 0 4 unless defined $idx
259 1 3 if $idx > @{$$self{'SEGMENTS'};}
261 0 3 if ($idx == 0) { }
1 2 elsif ($idx == @{$$self{'SEGMENTS'};}) { }
312 3 4 if $_->getName eq $name
333 3 1 if $index < @{$$self{'SEGMENTS'};}
352 1 2 unless defined $idx
353 0 2 if $idx > @{$$self{'SEGMENTS'};}
355 1 1 if ($segment->getName eq 'MSH' and $idx == 0)
370 33 0 if ($segment->getField(1))
374 33 0 if ($segment->getField(2) =~ /(.)(.)(.)(.)/)
382 17 16 if ($segment->getField(12))
431 3 13 $pretty ? :
454 0 20 unless $seg
458 11 9 $seg->getName eq 'MSH' ? :
487 0 81 unless $seg
511 1 1 if ($_->getName eq $name) { }