Branch Coverage

lib/XML/SAX/SVGTransformer.pm
Criterion Covered Total %
branch 92 132 69.7


line true false branch
27 7 26 if ($name eq 'svg' and not $self->_seen($name)) { }
7 38 elsif ($self->_stash('svg') and not $self->_stash('grouped')) { }
34 2 5 if ($name eq 'g' and (_attr($elem, 'id') || '') eq $self->_group_id) { }
38 0 5 $svg->{'Prefix'} ? :
65 3 4 if ($self->_stash("svg"))
68 2 1 if (@parts == 4 and not grep((!/^[-0-9.eE]+$/), @parts))
81 8 25 if ($name eq "svg")
83 1 7 if $self->_stash("added_wrapper")
84 7 1 if ($self->_seen($name) == $left)
85 0 7 $elem->{'Prefix'} ? :
93 4 3 if ($self->_stash("added_group") and $prev eq "g")
97 1 6 if ($self->_stash("added_wrapper"))
109 0 0 unless +(shift())->{'_info'}
119 0 0 if (not $svg_viewbox and $svg_width and $svg_height)
128 2 5 if $self->{'_comment'}
130 7 0 if ($svg_viewbox) { }
153 2 5 if ($self->{'KeepAspectRatio'})
157 0 2 if ($width > $view->{'max_x'})
160 1 1 if ($height > $view->{'max_y'})
164 1 1 if ($offset[0] or $offset[1])
202 6 1 if ($transform) { }
207 1 0 if ($self->_stash("added_group"))
222 2 12 unless defined $transform
225 6 8 if ($transform)
230 6 2 if ($name eq 'rotate') { }
0 2 elsif ($name eq 'flipx') { }
0 2 elsif ($name eq 'flipy') { }
0 2 elsif ($name eq 'matrix') { }
231 2 4 if (@ops and $ops[-1][0] eq 'rotate') { }
239 0 0 if (@ops and $ops[-1][0] eq 'matrix') { }
246 0 0 if (@ops and $ops[-1][0] eq 'matrix') { }
258 0 0 if (@ops and $ops[-1] eq 'matrix') { }
271 6 14 if ($name eq 'rotate') { }
0 14 elsif ($name eq 'matrix') { }
14 0 elsif ($name eq 'scale') { }
282 0 6 if ($matrix->equal($IdMatrix))
304 4 14 if ($name eq 'rotate') { }
0 14 elsif ($name eq 'matrix') { }
7 7 elsif ($name eq 'scale') { }
7 0 elsif ($name eq 'translate') { }
305 0 4 unless $args[0]
308 0 0 if $args[0]->equal($IdMatrix)
312 5 2 if $args[0] == 1 and $args[1] == 1
315 1 0 unless $args[0] or $args[1]
325 8 30 unless my $number = shift()
329 0 30 unless $number
334 0 15 unless defined $value
355 10 4 if ($set->{'min_x'} and $set->{'min_x'} < 0)
360 2 12 if ($set->{'min_y'} and $set->{'min_y'} < 0)
398 2 5 if ($x and $y) { }
1 4 elsif ($x) { }
0 4 elsif ($y) { }
399 2 0 if ($set->{'max_x'})
402 2 0 if ($set->{'max_y'})
405 2 0 if ($self->{'KeepAspectRatio'})
406 0 2 if ($scale_x > $scale_y) { }
413 1 0 if ($set->{'max_x'})
418 0 0 if ($set->{'max_y'})
434 0 39 if ($name ne $popped)
448 0 12 if ($self->{'SessionId'}) { }
458 28 70 if (@_)
467 32 42 if (@_) { }
469 31 1 if (defined $value and $value ne '') { }
470 12 19 unless (exists $elem->{'Attributes'}{"{}$name"}{'Name'})
479 0 42 unless exists $elem->{'Attributes'}
480 20 22 unless exists $elem->{'Attributes'}{"{}$name"}