Branch Coverage

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


line true false branch
14 1 67 unless ref $basis
16 0 67 unless ref $shape
19 34 537 if $basis->is_hash(@_)
20 106 569 if $basis->is_named_array(@_)
21 41 569 if $basis->is_string(@_)
22 2 558 if $basis->is_css_string(@_)
40 604 16 defined $_[1] && exists $_[0]{'format'}{lc $_[1]} ? :
41 327 63 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 604 unless $self->basis->is_array($values)
63 600 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 706 unless defined $values
76 248 2618 if @values == $self->dimensions
85 0 59 if not defined $space_name or ref $space_name or ref $from_code ne "CODE" or ref $to_code ne "CODE"
86 0 59 if $self->can_convert($space_name)
91 0 144 unless $self->{'basis'}->is_array($values) and defined $space_name
92 144 0 if $self->can_convert($space_name)
97 0 179 unless ref $values eq "ARRAY" and defined $space_name
98 179 0 if $self->can_convert($space_name)