Branch Coverage

lib/PostScript/Simple.pm
Criterion Covered Total %
branch 152 230 66.0


line true false branch
423 5 514 if (ref $u eq 'ARRAY') { }
426 2 3 if @$u != 2
428 512 2 if ($u =~ /^\s*(-?\d+(?:\.\d+)?)\s*([a-z][a-z])?\s*$/)
434 2 515 unless defined $val
435 0 515 unless defined $unit
437 1 514 unless defined $psunits{$unit}
439 15 499 unless (defined $self->{'usedunits'}{$unit})
443 10 5 unless $m == 1
444 6 9 unless $d == 1
450 501 13 if defined $rev
485 7 2 if ($self->{'eps'})
494 9 0 if (defined $psunits{$self->{'units'}}) { }
502 3 6 if (defined $self->{'papersize'})
506 6 3 if (not defined $self->{'xsize'} && defined $self->{'ysize'}) { }
507 3 3 if (defined $self->{'papersize'} and defined $pspaper{$self->{'papersize'}}) { }
522 2 7 unless ($self->{'eps'})
529 0 9 if ($self->{'landscape'}) { }
547 0 0 if ($self->{'eps'})
553 0 9 if ($self->{'clip'})
565 0 0 if ($self->{'eps'})
569 8 1 if ($self->{'reencode'})
573 0 8 if (ref $self->{'reencode'} eq 'ARRAY') { }
717 2 3 if (defined $nextpage)
719 1 4 if ($self->{'eps'})
726 2 2 if ($self->{'pspagecount'} != 0)
749 2 2 if ($self->{'page'} >= 0) { }
758 0 4 if ($self->{'landscape'})
759 0 4 if ($self->{'clip'})
762 0 4 if $x < 0
763 0 4 if $y < 0
764 0 4 if $x != 0 or $y != 0
798 0 4 unless $title
804 4 0 unless $user
808 2 2 if $self->{'eps'}
817 2 2 if ($self->{'eps'}) { }
841 0 4 if ($self->{'copies'} > 1)
848 2 2 if (not $self->{'eps'} and $self->{'pspagecount'} > 0)
857 0 4 if (length $self->{'pstrailer'})
891 0 4 unless open OUT, '>', $file
894 12 116 if (ref $i eq 'SCALAR') { }
928 0 0 if (ref $i eq 'SCALAR') { }
960 0 0 unless $self->{'eps'} == 1
992 10 43 if (@_ == 1)
994 9 1 if (defined $pscolours{$r}) { }
1003 0 52 unless (defined $r)
1004 0 52 unless (defined $g)
1005 2 50 unless (defined $b)
1007 2 50 if ($bad)
1018 50 0 if ($self->{'colour'}) { }
1056 2 1 if (@_ != 4)
1092 1 3 if $width eq 'thin'
1128 0 5 unless ($self->{'pspagecount'} or $self->{'eps'})
1133 4 9 if (@_ == 7) { }
2 7 elsif (@_ != 4) { }
1174 1 5 unless (@_ == 2)
1229 0 0 if (ref $_[0])
1233 0 0 unless ($self->{'pspagecount'} or $self->{'eps'})
1240 0 0 unless (@_ == 5)
1247 0 0 if ($opt{'filled'}) { }
1312 1 26 if ($#_ < 3)
1318 24 2 if (ref $_[0])
1325 22 4 if (defined $opt{'rotate'})
1326 20 2 if (ref $opt{'rotate'}) { }
1333 21 5 if (defined $opt{'offset'})
1334 21 0 if (ref $opt{'offset'}) { }
1342 6 20 unless (defined $opt{'filled'})
1346 0 26 unless (defined $x and defined $y)
1351 23 3 $xoffset || $yoffset || $rotate ? :
1353 23 3 if ($savestate)
1357 3 23 if ($xoffset or $yoffset)
1361 21 5 if ($rotate)
1362 3 18 unless (defined $self->{'psresources'}{'rotabout'})
1384 2 24 if ($opt{'filled'}) { }
1390 23 3 if ($savestate)
1427 2 4 if (ref $_[0])
1433 2 4 unless (@_ == 3)
1438 3 1 unless (defined $self->{'psresources'}{'circle'})
1443 2 2 if ($opt{'filled'}) { }
1484 0 0 if (ref $_[0])
1490 0 0 unless (@_ == 5)
1495 0 0 unless (defined $self->{'lastfontsize'})
1500 0 0 unless (defined $self->{'psresources'}{'circletext'})
1560 0 0 if ($opt{'align'} and $opt{'align'} eq 'outside') { }
1605 36 5 if (ref $_[0])
1611 1 40 unless (@_ == 4)
1616 4 36 unless (defined $opt{'filled'})
1620 4 36 unless (defined $self->{'psresources'}{'box'})
1633 36 4 if ($opt{'filled'}) { }
1661 1 3 unless (@_ == 2)
1717 5 14 if (ref $_[0])
1721 2 17 unless (@_ == 3)
1729 1 16 unless (defined $x and defined $y and defined $text)
1743 3 13 if (defined $opt{'rotate'})
1745 3 0 if ($rot_a != 0)
1755 3 13 if (defined $opt{'align'})
1757 1 2 if $opt{'align'} eq 'right'
1759 1 2 if $opt{'align'} eq 'center' or $opt{'align'} eq 'centre'
1782 1 1 unless (@_ == 8)
1787 0 1 unless ($self->{'pspagecount'} or $self->{'eps'})
1818 1 1 unless (@_ == 6)
1941 0 0 if (ref $_[0])
1947 0 0 unless (@_ == 5)
1952 0 0 unless defined $opt{'overlap'}
1953 0 0 unless defined $opt{'stretch'}
1964 0 0 if ($bbw == 0 or $bbh == 0)
1972 0 0 if ($opt{'stretch'} == 0)
1973 0 0 if ($opt{'overlap'} == 0) { }
1974 0 0 if ($scalex > $scaley) { }
1980 0 0 if ($scalex > $scaley) { }
2030 0 0 unless (@_ == 3)
2071 532 0 if (defined $self->{'currentpage'}) { }
2088 0 0 if (ref $_[0] ne 'PostScript::Simple::EPS')
2092 0 0 unless ($self->{'pspagecount'} or $self->{'eps'})
2098 0 0 if (@_ != 3)
2103 0 0 unless (defined $self->{'psresources'}{'importeps'})