Branch Coverage

blib/lib/Color/Calc.pm
Criterion Covered Total %
branch 53 70 75.7


line true false branch
41 332 499 length($a) % 3 ? :
43 40 66 unless $__HTMLColors{$col}
85 219 0 unless (UNIVERSAL::isa($$self{'ColorScheme'}, 'Graphics::ColorNames'))
87 7 212 if (defined $$self{'ColorScheme'}) { }
88 7 0 if (not ref $$self{'ColorScheme'} and $$self{'ColorScheme'} =~ /^([[:alnum:]_]+)$/)
90 0 7 if $@
92 0 7 unless $names
109 1 35 unless $__default_object
115 11 178 unless $__raw_object
130 4 11 unless (@_ and exists $import_param_names{$_[0]})
134 11 0 __import(scalar caller 0, @_) ? :
142 189 11 exists $param{'Prefix'} ? :
145 116 84 $std_prefix ? :
0 200 exists $param{'__Prefix'} ? :
147 168 32 exists $param{'__Suffix'} ? :
162 116 84 if ($std_prefix)
177 0 2400 $_ > 255 ? :
0 2400 !defined($_) || $_ < 0 ? :
181 0 195 unless defined $_[0]
182 0 195 if $_[0] eq ''
184 0 195 if $u != 0
198 0 698 if (ref $$p[0] eq 'ARRAY' and $#{$$p[0];} == 0)
202 272 426 if (ref $$p[0] eq 'ARRAY' and $#{$$p[0];} == 2) { }
0 426 elsif (my $f255 = UNIVERSAL::can($$p[0], 'asRGB255') || UNIVERSAL::can($$p[0], 'as_RGB255')) { }
0 426 elsif (my $f1 = UNIVERSAL::can($$p[0], 'asRGB') || UNIVERSAL::can($$p[0], 'as_RGB')) { }
65 361 elsif ($#$p >= 2 + ($q || 0) and __is_col_val($$p[0]) and __is_col_val($$p[1]) and __is_col_val($$p[2])) { }
58 303 elsif ($$p[0] =~ /^#?(([0-9A-F][0-9A-F][0-9A-F])+)$/i) { }
227 303 0 if (defined $col) { }
240 42 84 if (exists $__formats_require{$new_fmt})
242 42 0 if $@
257 22 197 $$self{'OutputFormat'} eq '__MODEvar' ? :
268 536 36 if (UNIVERSAL::isa($_[0][0], 'Color::Calc')) { }
584 8 200 if ($h_d2 <= $new_d2)
605 126 0 unless defined $alpha
661 44 220 $_ >= $cut ? :