Branch Coverage

lib/Template/Colour/HSV.pm
Criterion Covered Total %
branch 51 90 56.6


line true false branch
22 4 49 if ($class = ref $proto) { }
28 53 0 if @args
34 3 1 @_ && ref $_[0] eq 'HASH' ? :
42 3 1 unless defined $$args{'hue'}
44 4 0 unless defined $$args{'saturation'}
46 4 0 unless defined $$args{'value'}
55 9 44 if (@_ == 1) { }
42 2 elsif (@_ == 3) { }
0 2 elsif (@_ == 6) { }
2 0 elsif (@_) { }
78 6 45 if (UNIVERSAL::isa($hsv, 'HASH')) { }
45 0 elsif (UNIVERSAL::isa($hsv, 'ARRAY')) { }
80 4 2 unless exists $$hsv{'sat'}
81 4 2 unless exists $$hsv{'val'}
82 18 0 defined $$hsv{$_} ? :
105 52 10 if (@_)
115 72 8 if (@_)
117 0 72 if $sat < 0
118 12 60 if $sat > 255
127 72 8 if (@_)
129 0 72 if $val < 0
130 6 66 if $val > 255
139 0 0 @_ && ref $_[0] eq 'HASH' ? :
142 0 0 unless exists $$args{'sat'}
143 0 0 unless exists $$args{'val'}
146 0 0 if defined($value = $$args{'hue'})
149 0 0 if defined($value = $$args{'sat'})
152 0 0 if defined($value = $$args{'val'})
160 0 21 @_ && ref $_[0] eq 'HASH' ? :
163 0 21 unless exists $$args{'sat'}
164 21 0 unless exists $$args{'val'}
166 0 21 if ($delta = $$args{'hue'})
167 0 0 if $delta =~ s/(\d+)%$/$1/
172 21 0 if ($delta = $$args{'sat'})
173 21 0 if $delta =~ s/(\d+)%$/$1/
178 21 0 if ($delta = $$args{'val'})
179 21 0 if $delta =~ s/(\d+)%$/$1/
193 21 0 unless (@args)
197 4 17 if ($s == 0) { }
212 7 10 if ($i == 0) { }
0 10 elsif ($i == 1) { }
0 10 elsif ($i == 2) { }
10 0 elsif ($i == 3) { }
0 0 elsif ($i == 4) { }
262 0 0 wantarray ? :