Branch Coverage

blib/lib/MsOffice/Word/Surgeon/PackagePart.pm
Criterion Covered Total %
branch 21 44 47.7


line true false branch
101 1794 1755 if not $xml_before_text and !defined($txt_contents) || $txt_contents eq ''
109 152 1305 unless $xml_before_run or @texts
146 0 0 if $_
154 0 0 if ($drawing =~ m[<wp:docPr \s+ (.*?) />
160 0 0 unless my $img_id = $attrs{'title'} || $attrs{'descr'}
162 0 0 unless $image{$img_id} = "word/$rel_image{$rId}"
265 1 1 if $self->{'was_cleaned_up'}
279 0 7 unless my $regex = $noise_reduction_regexes{$regex_name}
288 3 7 ref $_ eq 'Regexp' ? :
310 2 15 $should_erase_contents{$bookmark_name} ? :
339 0 1 if @invalid_args
345 793 0 if $args{'no_caps'}
348 272 521 if (not $run->xml_before and @new_runs and $new_runs[-1]->props eq $run->props) { }
399 0 11 if (delete $replacement_args{'keep_xml_as_is'}) { }
401 0 0 if exists $replacement_args{'cleanup_XML'}
410 1 10 if (my $cleanup_args = $replacement_args{'cleanup_XML'})
411 1 0 unless ref $cleanup_args
412 0 1 unless ref $cleanup_args eq "HASH"
425 11 0 unless $dont_overwrite_contents
435 0 0 if $self->{'contents_has_changed'}
442 0 0 unless my $member_name = $self->images->{$image_title}
475 0 0 unless ($ct =~ /Extension="png"/u)