Branch Coverage

lib/Graphics/Toolkit/Color.pm
Criterion Covered Total %
branch 166 218 76.1


line true false branch
32 32 43 if (@args > 0 and not @args % 2)
34 1 31 if keys(%h) * 2 < int @args
37 67 7 unless defined $color_def
38 1 73 unless defined $color_def
40 41 32 ref $self ? :
44 22 3 ref $self ? :
48 0 97 if @args < 1 or @args > 8 or @args == 7
49 58 39 if @args == 1
50 22 17 if @args <= 5
55 11 137 if ref $color_def eq __PACKAGE__
60 50 265 unless ref $value_obj eq "Graphics::Toolkit::Color::Values"
63 254 0 if ref $_[0] eq __PACKAGE__
67 8 5 if ref $self ne __PACKAGE__
70 1 2 if defined $space_name and $space_name eq "in" and defined $named_arg
72 0 5 if defined $space_name and not ref $space
73 3 2 ref $space ? :
80 1 7 unless ref $values
87 0 36 if @$raw_args == 1 and ref $raw_args->[0] eq "HASH" and not defined $only_parameter && $only_parameter eq 'to' && ref _new_from_scalar_def($raw_args)
90 35 1 if (@$raw_args == 1 and defined $only_parameter and $only_parameter)
91 0 35 if @$required_parameter > 1
92 0 35 if @$required_parameter and $required_parameter->[0] ne $only_parameter
100 2 154 if (@$raw_args % 2)
101 0 2 defined $only_parameter && $only_parameter ? :
107 25 37 if (ref $parameter_alias eq "HASH" and exists $parameter_alias->{$parameter_name} and exists $arg_hash{$parameter_alias->{$parameter_name}})
111 8 75 unless exists $arg_hash{$parameter_name}
115 10 70 if (ref $parameter_alias eq "HASH" and exists $parameter_alias->{$parameter_name} and exists $arg_hash{$parameter_alias->{$parameter_name}})
121 142 396 exists $arg_hash{$parameter_name} ? :
123 7 139 if %arg_hash
136 0 70 unless ref $arg
138 0 70 if ref $result[0] eq "SCALAR"
139 48 22 wantarray ? :
144 35 2 unless @args
148 0 2 unless ref $arg
158 0 11 unless ref $arg
161 6 5 wantarray ? :
169 3 7 unless ref $arg
171 0 7 unless ref $target_color
173 0 7 unless ref $color_space
174 3 4 if (defined $arg->{'only'})
175 2 1 if (not ref $arg->{'only'}) { }
1 0 elsif (ref $arg->{'only'} eq 'ARRAY') { }
177 0 2 unless $color_space->is_axis_role($arg->{'only'})
180 0 2 unless $color_space->is_axis_role($axis_name)
187 0 7 unless ref $range_def
198 0 0 unless ref $arg
204 0 0 unless ref $arg
210 0 0 unless ref $arg
216 0 0 unless ref $arg
222 0 0 unless ref $arg
228 0 0 unless ref $arg
234 0 0 unless ref $arg
246 0 4 unless ref $arg
248 0 4 unless ref $color_space
250 0 4 unless ref $result
256 0 10 if @args == 1 and ref $args[0] eq "HASH"
259 1 9 if @args % 2 or not @args or @args > 10
263 0 9 if defined $color_space and not ref $color_space
265 2 7 unless ref $result
270 0 10 if @args == 1 and ref $args[0] eq "HASH"
273 1 9 if @args % 2 or not @args or @args > 10
277 0 9 if defined $color_space and not ref $color_space
279 3 6 unless ref $result
288 2 22 unless ref $arg
290 1 21 unless ref $color_space
292 10 11 if (ref $second_color) { }
294 2 9 if (ref $arg->{'to'} ne 'ARRAY') { }
299 9 6 if (ref $color_def eq __PACKAGE__) { }
302 0 6 unless ref $second_color
311 9 10 if (defined $arg->{'by'})
312 5 4 if (ref $arg->{'by'} eq 'ARRAY') { }
2 2 elsif (is_nr($arg->{'by'}) and $arg->{'by'} > 1) { }
313 7 1 if is_nr($_) and $_ > 1
317 2 17 unless ref $result
326 1 15 unless ref $arg and !ref($arg->{'only'}) || ref $arg->{'only'} eq 'ARRAY'
328 0 15 if defined $arg->{'in'} and not ref $color_space
329 10 5 if defined $arg->{'in'}
332 1 14 unless ref $result
342 1 12 unless ref $arg
343 2 10 unless is_nr($arg->{'steps'})
344 0 10 if $arg->{'steps'} < 1
345 1 9 unless is_nr($arg->{'tilt'})
346 1 8 unless is_nr($arg->{'skew'})
347 1 7 if ref $arg->{'target'} ne "HASH"
349 2 5 if (keys %{$$arg{'target'};}) { }
351 1 1 unless ref $target_delta
354 0 6 unless ref $color_space
355 0 6 unless $color_space->family eq "HSL"
358 0 6 unless ref $result[0]
367 3 8 unless ref $arg
369 8 0 if (ref $next_color) { }
371 2 6 unless is_nr($arg->{'steps'})
372 0 6 unless is_nr($arg->{'steps'}) and $arg->{'steps'} >= 2
373 2 4 unless is_nr($arg->{'tilt'})
375 1 3 unless ref $color_space
378 0 3 unless ref $result[0]
387 1 9 unless ref $arg
390 6 3 if (ref $target_color) { }
393 1 2 if ref $arg->{'to'} ne "ARRAY" or not @{$arg->{'to'};}
396 1 4 unless ref $target_color
400 0 7 unless is_nr($arg->{'steps'}) and $arg->{'steps'} >= 2
402 0 7 unless is_nr($arg->{'tilt'})
404 0 7 unless ref $color_space
407 0 7 unless ref $result[0]
416 6 14 unless ref $arg
418 1 13 unless ref $color_space
420 4 9 unless is_nr($arg->{'radius'}) and $arg->{'radius'} >= 0 or $color_space->is_number_tuple($arg->{'radius'})
422 2 7 unless is_nr($arg->{'minimal_distance'}) and $arg->{'minimal_distance'} > 0
424 1 6 if $color_space->axis_count > 3 and not ref $arg->{'radius'}
427 0 6 unless ref $result[0]