Branch Coverage

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


line true false branch
113 0 105 if exists $_space2class_cache{$space}
114 0 105 if exists $_class2space_cache{$class}
127 10 119 unless ($_space2class_cache_initialised)
132 0 100 unless require $file
134 100 0 unless $class->can("COLOR_SPACE")
135 0 0 unless my $thisspace = $class->COLOR_SPACE
176 0 8 unless $str =~ /^(\w+):(.*)$/u
179 0 8 unless my $class = _space2class($space)
271 0 121 unless my $to_class = _space2class($to_space)
275 42 79 if ($from_space eq $to_space)
281 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')) { }
329 0 274 if ($method =~ /^as_(.*)$/u)
331 0 0 unless _space2class($to_space)
346 197 0 if $method eq "DESTROY"
348 0 0 if (ref $_[0] and my $code = $_[0]->can($method))
352 0 0 unless (defined &{$method;})
427 11 10 if ($args{'enumerate'}) { }
10 0 elsif (my $enumerate_once = $args{'enumerate_once'}) { }
434 1 0 unless @colors