Branch Coverage

lib/Graphics/Toolkit/Color.pm
Criterion Covered Total %
branch 124 144 86.1


line true false branch
33 2 4 if @args == 2 and $first_arg_is_color_space and ref $args[1] eq "ARRAY"
34 7 79 if @args == 3 or @args > 3 and $first_arg_is_color_space
35 16 70 if @args == 6 or @args == 8
36 9 77 unless @args == 1
38 49 28 ref $self ? :
42 20 116 if ref $color_def eq __PACKAGE__
47 48 237 unless ref $value_obj eq "Graphics::Toolkit::Color::Values"
53 0 0 unless $_[0]{'name'}
77 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)
80 34 1 if (@$raw_args == 1 and defined $only_parameter and $only_parameter)
81 0 34 if @$required_parameter > 1
82 0 34 if @$required_parameter and $required_parameter->[0] ne $only_parameter
90 2 124 if (@$raw_args % 2)
91 0 2 defined $only_parameter && $only_parameter ? :
97 10 20 if (ref $parameter_alias eq "HASH" and exists $parameter_alias->{$parameter_name} and exists $arg_hash{$parameter_alias->{$parameter_name}})
101 6 62 unless exists $arg_hash{$parameter_name}
105 0 13 if (ref $parameter_alias eq "HASH" and exists $parameter_alias->{$parameter_name} and exists $arg_hash{$parameter_alias->{$parameter_name}})
111 100 284 exists $arg_hash{$parameter_name} ? :
113 7 111 if %arg_hash
133 1 56 unless ref $arg
139 32 2 unless @args
168 6 5 wantarray ? :
183 2 7 unless ref $arg
185 0 7 unless ref $target_color
187 0 7 unless ref $color_space
188 3 4 if (defined $arg->{'select'})
189 2 1 if (not ref $arg->{'select'}) { }
1 0 elsif (ref $arg->{'select'} eq 'ARRAY') { }
191 0 2 unless $color_space->is_axis_name($arg->{'select'})
194 0 2 unless $color_space->is_axis_name($axis_name)
201 0 7 unless ref $range_def
209 0 10 if @args == 1 and ref $args[0] eq "HASH"
217 1 9 if @args % 2 or not @args or @args > 10
221 0 9 unless ref $color_space
227 0 10 if @args == 1 and ref $args[0] eq "HASH"
235 1 9 if @args % 2 or not @args or @args > 10
239 0 9 unless ref $color_space
255 2 22 unless ref $arg
257 1 21 unless ref $color_space
259 10 11 if (ref $recipe) { }
260 1 9 if ref $arg->{'amount'}
261 5 4 if $arg->{'amount'} < 0
262 1 8 if $arg->{'amount'} > 100
264 8 1 if $arg->{'amount'} < 100
267 2 9 if (ref $arg->{'to'} ne 'ARRAY') { }
271 1 8 if ref $arg->{'to'} eq "ARRAY" and ref $arg->{'amount'} eq "ARRAY" and @{$arg->{'amount'};} != @{$arg->{'to'};}
273 5 3 unless (ref $arg->{'amount'})
276 5 0 $arg->{'amount'} < 0 ? :
283 0 14 unless ref $color
287 6 2 if $amount_sum < 100
288 1 7 if ($amount_sum > 100)
304 1 12 unless ref $arg
306 1 11 unless ref $color_space
321 1 11 unless ref $arg
322 2 9 unless is_nr($arg->{'steps'})
323 0 9 unless $arg->{'steps'}
324 1 8 unless is_nr($arg->{'tilt'})
325 1 7 if ref $arg->{'target'} ne "HASH"
327 2 5 if (keys %{$$arg{'target'};}) { }
329 1 1 unless ref $target_values
347 2 12 unless ref $arg
350 9 3 if (ref $target_color) { }
353 1 2 if ref $arg->{'to'} ne "ARRAY" or not @{$arg->{'to'};}
356 1 4 unless ref $target_color
361 1 9 unless is_nr($arg->{'steps'}) and $arg->{'steps'} > 0
363 1 8 unless is_nr($arg->{'tilt'})
365 1 7 unless ref $color_space
383 6 12 unless ref $arg
385 1 11 unless ref $color_space
387 3 8 unless is_nr($arg->{'radius'}) or $color_space->is_number_tuple($arg->{'radius'})
389 2 6 unless is_nr($arg->{'minimal_distance'}) and $arg->{'minimal_distance'} > 0
391 1 5 if $color_space->axis_count > 3 and not ref $arg->{'radius'}