Branch Coverage

blib/lib/App/MARC/Filter.pm
Criterion Covered Total %
branch 40 50 80.0


line true false branch
50 3 10 if (not &getopts("hn:o:rv", $self->{'_opts'}) or $self->{'_opts'}{'h'} or @ARGV < 3)
59 7 2 if ($self->{'_marc_field'} ne "leader" and $self->{'_marc_field'} ne "material_type" and &none(sub {
66 1 9 if (not defined $self->{'_marc_value'}) { }
74 1 8 if (&none(sub {
85 1 15 if (defined $self->{'_opts'}{'n'} and int $self->{'_opts'}{'n'} == $self->{'_num_found'})
92 1 14 if ($App::MARC::Filter::EVAL_ERROR)
93 0 1 defined $previous_record ? :
102 7 7 unless (defined $record)
108 1 6 if ($self->{'_marc_field'} eq 'leader') { }
1 5 elsif ($self->{'_marc_field'} eq 'material_type') { }
1 4 elsif (&any(sub {
135 3 1 if (defined $record_to_print)
139 3 1 if (defined $record_to_print)
146 0 7 if ($self->{'_opts'}{'v'})
153 6 2 if ($self->{'_printed'})
154 6 0 if ($self->{'_opts'}{'o'} eq "xml")
165 0 7 unless (defined $value)
169 1 6 if ($self->{'_opts'}{'r'}) { }
170 1 0 if ($value =~ /$self->{'_marc_value'}/ms)
175 5 1 if ($value eq $self->{'_marc_value'})
187 1 6 unless (defined $record)
191 6 0 unless ($self->{'_printed'})
192 6 0 if ($self->{'_opts'}{'o'} eq "xml")
197 6 0 if ($self->{'_opts'}{'o'} eq 'xml') { }
0 0 elsif ($self->{'_opts'}{'o'} eq 'ascii') { }