Branch Coverage

blib/lib/Convert/Color.pm
Criterion Covered Total %
branch 22 42 52.3


line true false branch
117 0 105 if exists $_space2class_cache{$space}
118 0 105 if exists $_class2space_cache{$class}
133 10 119 unless ($_space2class_cache_initialised)
138 0 100 unless require $file
140 100 0 unless $class->can("COLOR_SPACE")
141 0 0 unless my $thisspace = $class->COLOR_SPACE
182 0 8 unless $str =~ /^(\w+):(.*)$/u
185 0 8 unless my $class = _space2class($space)
277 0 121 unless my $to_class = _space2class($to_space)
281 42 79 if ($from_space eq $to_space)
287 30 49 if ($code = $self->can("convert_to_$to_space")) { }
3 46 elsif ($code = $to_class->can("new_from_$from_space")) { }
46 0 elsif ($code = $to_class->can('new_rgb')) { }
335 0 274 if ($method =~ /^as_(.*)$/u)
337 0 0 unless _space2class($to_space)
352 197 0 if $method eq "DESTROY"
354 0 0 if (ref $_[0] and my $code = $_[0]->can($method))
358 0 0 unless (defined &{$method;})
433 11 10 if ($args{'enumerate'}) { }
10 0 elsif (my $enumerate_once = $args{'enumerate_once'}) { }
440 1 0 unless @colors