Branch Coverage

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


line true false branch
98 2 16 unless $self->_init(@_)
123 9 9 if ($hl7str)
136 1 8 if ($fldSep ne $fldSepCtrl)
163 8 47 if ($i == 0 and $j == 0)
175 37 3 if (@subComps <= 1) { }
184 41 6 if (@comps <= 1) { }
197 14 1 if ($name =~ /^[A-Z][A-Z0-9]{2}$/)
205 8 7 if ($segClass and eval "require $segClass;") { }
213 1 14 unless $seg
236 17 15 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 26 0 if ($segment->getField(1))
374 26 0 if ($segment->getField(2) =~ /(.)(.)(.)(.)/)
382 10 16 if ($segment->getField(12))
431 3 9 $pretty ? :
454 0 16 unless $seg
458 9 7 $seg->getName eq 'MSH' ? :
487 0 54 unless $seg
511 1 1 if ($_->getName eq $name) { }