Condition Coverage

blib/lib/MooX/ValidateSubs/Role.pm
Criterion Covered Total %
condition 28 38 73.6


and 2 conditions

line l !l condition
36 0 4 @params = $self->_preprocess_params(@params) and $count[0] = scalar @params
38 12 0 do { $preprocess = 0 } && (last)
54 16 1 $spec->[$_][1] =~ /^1$/ and next
66 39 5 $spec->{$_}[1] =~ /^1$/ and next

and 3 conditions

line !l l&&!r l&&r condition
38 8 4 4 $params[$_] =~ /[0-9]+/ && $params[$_] <= $count[1]
42 16 2 4 $count[0] == 1 and $count[1] != 1
18 1 3 $count[0] == 1 and $count[1] != 1 and ref $params[0] eq 'ARRAY'
49 5 0 17 $count[0] >= $count[2] and $count[0] <= $count[1]
54 33 0 17 not $params[$_] and $spec->[$_][1]
66 55 12 44 not $para{$_} and $spec->{$_}[1]

or 3 conditions

line l !l&&r !l&&!r condition
13 32 21 0 $self->$store_spec->{"compiled_$type"} ||= do { if (ref $spec eq 'ARRAY') { my(@types) = map({my($constraint, $default) = (@$_, 0); $default eq '1' ? &Types::Standard::Optional()->of($constraint) : $constraint;} @$spec); compile(@types); } else { my %types; foreach my $key (keys %$spec) { my($constraint, $default) = (@{$spec->{$key};}, 0); $types{$key} = $default eq '1' ? &Types::Standard::Optional()->of($constraint) : $constraint; } ; compile_named(%types); } }
38 16 0 19 $_ == 0 || !$_ % 2
54 0 16 0 $spec->[$_][1] =~ /^1$/ and next or $params[$_] = $self->_default($spec->[$_][1])
66 0 39 0 $spec->{$_}[1] =~ /^1$/ and next or $para{$_} = $self->_default($spec->{$_}[1])