Branch Coverage

lib/Graphics/Toolkit/Color.pm
Criterion Covered Total %
branch 131 152 86.1


line true false branch
33 9 78 unless defined $color_def
35 50 28 ref $self ? :
40 2 4 if @args == 2 and $first_arg_is_color_space and ref $args[1] eq "ARRAY"
41 8 83 if @args == 3 or @args > 3 and $first_arg_is_color_space
42 16 75 if @args == 6 or @args == 8
43 82 9 @args == 1 ? :
47 20 117 if ref $color_def eq __PACKAGE__
52 48 244 unless ref $value_obj eq "Graphics::Toolkit::Color::Values"
59 0 35 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)
62 34 1 if (@$raw_args == 1 and defined $only_parameter and $only_parameter)
63 0 34 if @$required_parameter > 1
64 0 34 if @$required_parameter and $required_parameter->[0] ne $only_parameter
72 2 133 if (@$raw_args % 2)
73 0 2 defined $only_parameter && $only_parameter ? :
79 10 20 if (ref $parameter_alias eq "HASH" and exists $parameter_alias->{$parameter_name} and exists $arg_hash{$parameter_alias->{$parameter_name}})
83 6 66 unless exists $arg_hash{$parameter_name}
87 0 13 if (ref $parameter_alias eq "HASH" and exists $parameter_alias->{$parameter_name} and exists $arg_hash{$parameter_alias->{$parameter_name}})
93 103 309 exists $arg_hash{$parameter_name} ? :
95 7 120 if %arg_hash
115 1 59 unless ref $arg
121 34 2 unless @args
150 6 5 wantarray ? :
165 2 7 unless ref $arg
167 0 7 unless ref $target_color
169 0 7 unless ref $color_space
170 3 4 if (defined $arg->{'select'})
171 2 1 if (not ref $arg->{'select'}) { }
1 0 elsif (ref $arg->{'select'} eq 'ARRAY') { }
173 0 2 unless $color_space->is_axis_name($arg->{'select'})
176 0 2 unless $color_space->is_axis_name($axis_name)
183 0 7 unless ref $range_def
191 2 2 unless ref $self eq __PACKAGE__
193 0 4 unless defined $color_def
207 0 4 unless ref $arg
209 0 4 unless ref $color_space
215 0 10 if @args == 1 and ref $args[0] eq "HASH"
223 1 9 if @args % 2 or not @args or @args > 10
227 0 9 unless ref $color_space
233 0 10 if @args == 1 and ref $args[0] eq "HASH"
241 1 9 if @args % 2 or not @args or @args > 10
245 0 9 unless ref $color_space
261 2 22 unless ref $arg
263 1 21 unless ref $color_space
265 10 11 if (ref $recipe) { }
266 1 9 if ref $arg->{'amount'}
267 5 4 if $arg->{'amount'} < 0
268 1 8 if $arg->{'amount'} > 100
270 8 1 if $arg->{'amount'} < 100
273 2 9 if (ref $arg->{'to'} ne 'ARRAY') { }
277 1 8 if ref $arg->{'to'} eq "ARRAY" and ref $arg->{'amount'} eq "ARRAY" and @{$arg->{'amount'};} != @{$arg->{'to'};}
279 5 3 unless (ref $arg->{'amount'})
282 5 0 $arg->{'amount'} < 0 ? :
289 0 14 unless ref $color
293 6 2 if $amount_sum < 100
294 1 7 if ($amount_sum > 100)
312 1 14 unless ref $arg and !ref($arg->{'only'}) || ref $arg->{'only'} eq 'ARRAY'
314 1 13 unless ref $color_space
329 1 11 unless ref $arg
330 2 9 unless is_nr($arg->{'steps'})
331 0 9 unless $arg->{'steps'}
332 1 8 unless is_nr($arg->{'tilt'})
333 1 7 if ref $arg->{'target'} ne "HASH"
335 2 5 if (keys %{$$arg{'target'};}) { }
337 1 1 unless ref $target_values
355 2 12 unless ref $arg
358 9 3 if (ref $target_color) { }
361 1 2 if ref $arg->{'to'} ne "ARRAY" or not @{$arg->{'to'};}
364 1 4 unless ref $target_color
369 1 9 unless is_nr($arg->{'steps'}) and $arg->{'steps'} > 0
371 1 8 unless is_nr($arg->{'tilt'})
373 1 7 unless ref $color_space
391 6 12 unless ref $arg
393 1 11 unless ref $color_space
395 3 8 unless is_nr($arg->{'radius'}) or $color_space->is_number_tuple($arg->{'radius'})
397 2 6 unless is_nr($arg->{'minimal_distance'}) and $arg->{'minimal_distance'} > 0
399 1 5 if $color_space->axis_count > 3 and not ref $arg->{'radius'}