Branch Coverage

blib/lib/TAP3/Tap3edit.pm
Criterion Covered Total %
branch 88 134 65.6


line true false branch
86 14 0 if (@_)
102 14 0 if (@_)
103 14 0 if (not $self->{'_version'}) { }
125 5 0 if (@_)
126 5 0 if (not $self->{'_supl_version'}) { }
147 14 0 if (@_)
148 14 0 if (not $self->{'_release'}) { }
170 5 0 if (@_)
171 5 0 if (not $self->{'_supl_release'}) { }
192 14 105 if (@_)
193 14 0 if (not $self->{'_file_type'}) { }
196 0 14 unless ($file_type =~ /^[TR]AP$|^NRT$/)
224 0 14 unless $self->_get_file_version
239 42 28 if (@_)
255 14 84 if (@_)
272 5 48 if (@_)
290 0 14 if (@_)
307 28 28 if (@_)
323 0 28 if (@_)
422 0 28 unless (open FILE, "<$filename")
460 0 6090 if (defined $1)
463 16 6074 if (defined $2)
466 0 6090 if (defined $3)
469 10 6080 if (defined $4)
472 16 6074 if (defined $5)
475 16 6074 if (defined $6)
478 0 6090 if (defined $7)
481 0 6090 if (defined $8)
484 2 6088 if (defined $9)
487 2 6088 if (defined $10)
490 2 6088 if (defined $11)
499 0 28 unless (defined $file_type)
504 16 12 if ($file_type eq 'TAP' or $file_type eq 'NOT') { }
0 12 elsif ($file_type eq 'RAP') { }
10 2 elsif ($file_type eq 'ACK') { }
2 0 elsif ($file_type eq 'NRT') { }
505 0 16 if (not $release && $version) { }
514 0 0 if ($rap_version and $rap_release)
515 0 0 if (not $release && $version) { }
533 0 2 if (not $release && $version) { }
579 19 0 if ($spec_file)
615 14 14 unless ($self->spec_file)
616 0 14 unless $self->spec_file($self->_select_spec_file($self->{'_version'}, $self->{'_release'}, $self->file_type))
623 5 23 if (not $self->supl_spec_file and $self->file_type eq 'RAP')
624 0 5 unless $self->supl_spec_file($self->_select_spec_file($self->{'_supl_version'}, $self->{'_supl_release'}, 'TAP'))
635 0 28 unless (($size) = (stat $self->spec_file)[7])
636 0 28 unless (open FILE, '<' . $self->spec_file)
639 23812 1360 if (/^...Structure of a (... batch|...... record)/ ... /END/)
640 23766 28 unless ($_ =~ /Structure of a (Tap batch|NRTRDE)/ or $_ =~ /END/)
652 10 18 if ($self->file_type eq 'RAP')
653 0 10 unless (($size) = (stat $self->supl_spec_file)[7])
654 0 10 unless (open FILE, '<' . $self->supl_spec_file)
656 15710 480 if (/^...Structure of a ... batch/ ... /END/)
657 15690 10 unless ($_ =~ /Structure of a Tap batch/ or $_ =~ /END/)
694 0 28 unless ($asn->prepare($spec_buf_in))
702 16 12 if ($self->file_type eq 'TAP') { }
2 10 elsif ($self->file_type eq 'NRT') { }
703 0 16 unless ($dic_asn = $asn->find('DataInterChange'))
705 0 2 unless ($dic_asn = $asn->find('Nrtrde'))
707 0 10 unless ($dic_asn = $asn->find('RapDataInterChange'))
738 0 14 unless $self->_get_file_version
745 0 14 unless $self->_select_asn_struct
753 0 14 unless (open $FILE, "<$filename")
763 0 14 unless ($self->{'_dic_decode'} = $self->_dic_asn->decode($buf_in))
797 0 14 unless $self->_select_asn_struct
804 0 14 unless (my $buf_out = $self->_dic_asn->encode($self->_dic_decode))
811 0 14 unless (open FILE_OUT, ">$filename")