Branch Coverage

blib/lib/SVGPDF/CSS.pm
Criterion Covered Total %
branch 53 82 64.6


line true false branch
10 0 10 if @_
11 0 0 if @_
13 0 2 if @_
15 0 0 if @_
49 0 21 unless (/^\s*([^{]+?)\s*\{(.*)\}\s*$/u)
64 0 23 if ($_ eq "\@font-face")
73 0 25 unless (/^\s*(\*?[\w._-]+)\s*:\s*(.*?)\s*$/u)
82 9 16 if ($s eq 'font') { }
0 16 elsif ($s eq 'outline') { }
88 7 19 if ($spec =~ /^([.\d]+)px/u) { }
2 17 elsif ($spec eq 'bold') { }
0 17 elsif ($spec eq 'italic') { }
0 17 elsif ($spec eq 'bolditalic') { }
2 15 elsif ($spec =~ /^(?:text,)?serif$/iu) { }
5 10 elsif ($spec =~ /^(?:text,)?sans(?:-serif)?$/iu) { }
2 8 elsif ($spec =~ /^abc2svg(?:\.ttf)?$/iu) { }
0 8 elsif (lc($spec) =~ /^musejazz\s*text$/iu) { }
121 9 0 if keys %s > 1
131 0 0 if ($spec =~ /^([.\d]+)px/u) { }
0 0 elsif ($spec =~ /^(dotted|dashed|solid|double|groove|ridge|inset|outset)$/iu) { }
143 0 0 if keys %s > 1
156 0 56 if ($k =~ /^\@font-face/u)
164 53 3 unless $k =~ /^(\S+)\s+(\S+)$/u
175 0 644 unless defined $right
176 644 0 if (ref $left eq "HASH" and ref $right eq "HASH")
178 196 3503 if (exists $left->{$_} and ref $left->{$_} eq 'HASH' and ref $right->{$_} eq 'HASH') { }
195 74 2 if (exists $css->{'_'})
203 1 190 ref $args[0] eq 'HASH' ? :
213 155 36 if (exists $css->{'_'})
219 214 215 if /^(element|class|style|id)$/u
224 6 185 if ($args->{'element'} and exists $$css{$args->{'element'}})
227 3 188 if ($args->{'element'} and exists $css->{'_'}{' ' . $args->{'element'}})
232 8 183 if ($args->{'class'})
235 8 10 if exists $$css{".$_"}
237 0 18 if $args->{'element'} and exists $$css{$args->{'element'} . ".$_"}
242 0 191 if ($args->{'id'} and exists $$css{'#' . $args->{'id'}})
247 0 191 if ($args->{'id'} and exists $$css{$args->{'element'} . '#' . $args->{'id'}})
252 8 183 if ($args->{'style'})
253 0 8 unless $self->read_string('__ {' . $args->{'style'} . '}')
258 191 0 if $ffam
265 0 185 unless @stack