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 8 @params = $self->_preprocess_params(@params) and $count[0] = scalar @params
38 17 0 do { $preprocess = 0 } && (last)
54 32 1 $spec->[$_][1] =~ /^1$/ and next
66 48 5 $spec->{$_}[1] =~ /^1$/ and next

and 3 conditions

line !l l&&!r l&&r condition
38 11 6 8 $params[$_] =~ /[0-9]+/ && $params[$_] <= $count[1]
42 27 4 5 $count[0] == 1 and $count[1] != 1
31 1 4 $count[0] == 1 and $count[1] != 1 and ref $params[0] eq "ARRAY"
49 7 0 29 $count[0] >= $count[2] and $count[0] <= $count[1]
54 49 0 33 not $params[$_] and $spec->[$_][1]
66 70 16 53 not $para{$_} and $spec->{$_}[1]

or 3 conditions

line l !l&&r !l&&!r condition
13 48 28 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 25 0 29 $_ == 0 || !$_ % 2
54 0 32 0 $spec->[$_][1] =~ /^1$/ and next or $params[$_] = $self->_default($spec->[$_][1])
66 0 48 0 $spec->{$_}[1] =~ /^1$/ and next or $para{$_} = $self->_default($spec->{$_}[1])