Branch Coverage

blib/lib/PostScript/File/Metrics.pm
Criterion Covered Total %
branch 42 76 55.2


line true false branch
67 0 0 defined $v ? :
0 0 defined $v ? :
0 0 defined $v ? :
0 0 defined $v ? :
0 0 defined $v ? :
0 0 defined $v ? :
71 0 14 unless ($success and $success eq 'OK')
84 0 0 if (1 != (my $f = $self->{'factor'})) { }
102 0 0 $font eq 'Symbol' ? :
105 13 0 unless ($Metrics{$font}{$encoding})
110 0 13 unless (do { local $@; eval "require $package; 1" } and $Metrics{$font}{$encoding})
127 13 0 unless $encoding =~ /^(?:std|sym)$/
143 13 0 $size ? :
154 0 157 unless defined $_[0] and length $_[0]
159 0 0 $self->{'auto_hyphen'} ? :
157 0 $_[1] ? :
175 4 11 @_ ? :
182 1 14 exists $param{'chars'} ? :
184 0 15 if %param
188 3 12 if &Encode::is_utf8($text)
191 15 0 $self->{'auto_hyphen'} ? :
198 6 130 if (/\G[ \t\r]*\n/cg) { }
201 12 118 unless /\G($re)/g
204 117 38 if ($self->width($lines[-1] . $word, 1) <= $width) { }
1 37 elsif ($lines[-1] eq '') { }
210 0 1 if $warnings
211 1 0 unless $quiet
219 3 121 if (defined $maxlines and @lines >= $maxlines)
220 3 0 if /\G(.*[^ \t\r\n])/gs
221 1 2 if ($warnings || !$quiet and (my $linewidth = $self->width($lines[-1], 1)) > $width)
225 0 1 if $warnings
226 1 0 unless $quiet
238 1 14 unless @lines == 1 or length $lines[-1]
240 15 0 if ($self->{'auto_hyphen'}) { }
267 13 1 unless (defined $chars)
269 13 0 if ($self->{'encoding'})
272 1 12 if $self->{'encoding'}->name eq 'cp1252'
279 13 1 if (length $chars) { }