Branch Coverage

blib/lib/MsOffice/Word/Surgeon/PackagePart.pm
Criterion Covered Total %
branch 64 106 60.3


line true false branch
98 2621 2546 unless $xml_before_text or length $txt_contents
106 41 1684 unless $xml_before_run or @texts
142 0 0 if $_
150 0 0 if ($drawing =~ m[<wp:docPr \s+ (.*?) />
156 0 0 unless my $img_id = $attrs{'title'} || $attrs{'descr'}
158 0 0 unless $image{$img_id} = "word/$rel_image{$rId}"
248 1 2 if $self->{'was_cleaned_up'}
268 0 14 ref $_ eq 'Regexp' ? :
279 0 14 unless my $regex = $noise_reduction_regexes{$regex_name}
297 0 2 if @invalid_args
303 577 521 if $args{'no_caps'}
306 54 1044 if (not $run->xml_before and @new_runs and $new_runs[-1]->props eq $run->props) { }
330 0 12 if (delete $replacement_args{'keep_xml_as_is'}) { }
332 0 0 if exists $replacement_args{'cleanup_XML'}
341 2 10 if (my $cleanup_args = $replacement_args{'cleanup_XML'})
342 2 0 unless ref $cleanup_args
343 0 2 unless ref $cleanup_args eq "HASH"
356 12 0 unless $dont_overwrite_contents
365 0 7 if $self->{'contents_has_changed'}
396 39 40 if $attrs{'w:name'}
400 3 0 wantarray ? :
410 0 2 if @invalid_opt
411 2 0 unless keys %options
421 18 19 if ($boundary->kind eq 'Start') { }
19 0 elsif ($boundary->kind eq 'End') { }
432 1 18 if (not defined $start_ix) { }
442 18 0 if ($should_erase_markup or $should_erase_range)
448 0 18 if ($should_erase_range)
451 0 0 if $inner_boundary->node_xml
486 21 21 if ($boundary->kind eq 'Start') { }
21 0 elsif ($boundary->kind eq 'End') { }
540 0 144 if ($node{'field_kind'} eq 'Simple') { }
144 0 elsif ($node{'field_kind'} eq 'Char') { }
557 3 0 wantarray ? :
588 2 6 $field->type eq 'ASK' ? :
611 48 96 if ($fldChar_type eq 'begin') { }
622 0 96 unless my $current_field = $field_stack->[-1]
626 48 48 if ($current_status eq 'begin') { }
48 0 elsif ($current_status eq 'separate') { }
0 0 elsif ($current_status eq 'end') { }
631 0 48 unless $fldChar_type eq "end"
651 46 98 if ($last_field and $prev_field and $last_field->status eq "end")
655 2 44 if ($prev_status eq 'begin') { }
30 14 elsif ($prev_status eq 'separate') { }
681 0 0 unless my $member_name = $self->images->{$image_title}
714 0 0 unless ($ct =~ /Extension="png"/u)
746 17 777 if $2
747 388 389 $1 ? :
756 0 42 $is_outside_para && $xml ? :
779 1 0 unless exists $self{'ignore'}
781 0 1 unless $self{'color'} =~ / ^( black | blue | cyan | darkBlue | darkCyan |
794 30 12 if $self->{'ignore'} and $bookmark_name =~ /$self->{'ignore'}/u
798 6 6 $is_end_node ? :