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 int(%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
242 0 4 unless ref $arg
244 0 4 unless ref $color_space
246 0 4 unless ref $result
253 0 10 if @args == 1 and ref $args[0] eq "HASH"
256 1 9 if @args % 2 or not @args or @args > 10
260 0 9 if defined $color_space and not ref $color_space
262 2 7 unless ref $result
267 0 10 if @args == 1 and ref $args[0] eq "HASH"
270 1 9 if @args % 2 or not @args or @args > 10
274 0 9 if defined $color_space and not ref $color_space
276 3 6 unless ref $result
285 2 22 unless ref $arg
287 1 21 unless ref $color_space
289 10 11 if (ref $second_color) { }
291 2 9 if (ref $arg->{'to'} ne 'ARRAY') { }
296 9 6 if (ref $color_def eq __PACKAGE__) { }
299 0 6 unless ref $second_color
308 9 10 if (defined $arg->{'by'})
309 5 4 if (ref $arg->{'by'} eq 'ARRAY') { }
2 2 elsif (is_nr($arg->{'by'}) and $arg->{'by'} > 1) { }
310 7 1 if is_nr($_) and $_ > 1
314 2 17 unless ref $result
323 1 15 unless ref $arg and !ref($arg->{'only'}) || ref $arg->{'only'} eq 'ARRAY'
325 0 15 if defined $arg->{'in'} and not ref $color_space
326 10 5 if defined $arg->{'in'}
329 1 14 unless ref $result
339 1 12 unless ref $arg
340 2 10 unless is_nr($arg->{'steps'})
341 0 10 if $arg->{'steps'} < 1
342 1 9 unless is_nr($arg->{'tilt'})
343 1 8 unless is_nr($arg->{'skew'})
344 1 7 if ref $arg->{'target'} ne "HASH"
346 2 5 if (keys %{$$arg{'target'};}) { }
348 1 1 unless ref $target_delta
351 0 6 unless ref $color_space
352 0 6 unless $color_space->family eq "HSL"
355 0 6 unless ref $result[0]
364 3 8 unless ref $arg
366 8 0 if (ref $next_color) { }
368 2 6 unless is_nr($arg->{'steps'})
369 0 6 unless is_nr($arg->{'steps'}) and $arg->{'steps'} >= 2
370 2 4 unless is_nr($arg->{'tilt'})
372 1 3 unless ref $color_space
375 0 3 unless ref $result[0]
384 1 9 unless ref $arg
387 6 3 if (ref $target_color) { }
390 1 2 if ref $arg->{'to'} ne "ARRAY" or not @{$arg->{'to'};}
393 1 4 unless ref $target_color
397 0 7 unless is_nr($arg->{'steps'}) and $arg->{'steps'} >= 2
399 0 7 unless is_nr($arg->{'tilt'})
401 0 7 unless ref $color_space
404 0 7 unless ref $result[0]
413 6 14 unless ref $arg
415 1 13 unless ref $color_space
417 4 9 unless is_nr($arg->{'radius'}) and $arg->{'radius'} >= 0 or $color_space->is_number_tuple($arg->{'radius'})
419 2 7 unless is_nr($arg->{'minimal_distance'}) and $arg->{'minimal_distance'} > 0
421 1 6 if $color_space->axis_count > 3 and not ref $arg->{'radius'}
424 0 6 unless ref $result[0]