Branch Coverage

lib/Graphics/Toolkit/Color/Space.pm
Criterion Covered Total %
branch 30 42 71.4


line true false branch
14 1 65 unless ref $basis
16 0 65 unless ref $shape
19 34 523 if $basis->is_hash(@_)
20 96 533 if $basis->is_named_array(@_)
21 37 544 if $basis->is_string(@_)
22 2 556 if $basis->is_css_string(@_)
40 598 16 defined $_[1] && exists $_[0]{'format'}{lc $_[1]} ? :
41 312 59 defined $_[1] && exists $_[0]{'convert'}{uc $_[1]} ? :
56 0 9 if not defined $format or ref $format or ref $code ne "CODE"
57 0 9 if $self->has_format($format)
62 0 598 unless $self->basis->is_array($values)
63 594 4 if $self->has_format($format)
68 0 17 if not defined $format or ref $format or exists $self->{'deformat'}{$format} or ref $code ne "CODE"
73 0 657 unless defined $values
76 235 2520 if @values == $self->dimensions
85 0 57 if not defined $space_name or ref $space_name or ref $from_code ne "CODE" or ref $to_code ne "CODE"
86 0 57 if $self->can_convert($space_name)
91 0 128 unless $self->{'basis'}->is_array($values) and defined $space_name
92 128 0 if $self->can_convert($space_name)
97 0 182 unless ref $values eq "ARRAY" and defined $space_name
98 182 0 if $self->can_convert($space_name)