Branch Coverage

blib/lib/Image/Math/Constrain.pm
Criterion Covered Total %
branch 35 54 64.8


line true false branch
126 0 15 ref $_[0] ? :
129 6 9 if (@_ == 1)
130 6 0 defined $_[0] ? :
131 1 5 if (ref $value eq 'ARRAY' and @$value == 2)
134 0 5 if ref $value
137 1 4 if $value =~ /^constrain\((\d+)x(\d+)\)$/
139 2 2 if $value =~ /^(\d+)x(\d+)$/
141 1 1 if $value =~ /^(\d+)w(\d+)h$/
143 1 0 if $value =~ /^(\d+)w$/
145 0 0 if $value =~ /^(\d+)h$/
147 0 0 if ($class->_non_neg_int($value))
154 0 9 unless @_ == 2
156 9 0 $class->_non_neg_int($_[0]) ? :
157 9 0 $class->_non_neg_int($_[0]) ? :
240 3 0 $self->_pos_int($_[0]) ? :
241 3 0 $self->_pos_int($_[0]) ? :
242 0 3 unless ($$self{'width'} or $$self{'height'})
247 2 1 $$self{'width'} && $$self{'width'} < $width ? :
249 2 1 $$self{'height'} && $$self{'height'} < $height ? :
253 1 2 if ($w_scale == 1 and $h_scale == 1)
258 2 0 $w_scale < $h_scale ? :
274 18 0 defined $_[1] ? :
275 0 18 if ref $value
276 3 15 if $value eq '0'
282 6 0 defined $_[1] ? :
283 0 6 if ref $value
290 2 1 shift @_ ? :