Condition Coverage

blib/lib/Data/Domain.pm
Criterion Covered Total %
condition 110 157 70.0


and 3 conditions

line !l l&&!r l&&r condition
76 0 5 1 !ref($_->[0]) && $_->[0] =~ /^!/
253 2 0 1 $is_absent && exists $self->{'-if_absent'}
516 0 0 13 &does($range, "ARRAY") and @$range == 2
534 143 20 21 defined $min and defined $max
606 177 32 161 @$args_ref and $args_ref->[0] =~ /^-/
677 25 2 0 $self->{'-defined'} and $self->{'-optional'}
780 0 25 79 defined $data and $data =~ /^-?\d+$/
797 0 1 2 defined $data and $data =~ /^\d+$/
941 14 1 6 $self->{$bound} and not $self->{$bound} =~ /$dynamic_date/
978 4 0 14 @date and check_date(@date)
1016 1 0 8 $h <= 23 && $m <= 59 && $s <= 59
1054 2 0 4 $self->{$bound} and $self->{$bound} ne "now"
1056 0 0 4 @time and _valid_time(@time)
1073 1 1 4 @t and _valid_time(@t)
1177 20 0 0 $self->{$bound} and $self->{$bound} < @{$self->{'-items'};}
1210 38 6 1 defined $self->{'-min_size'} and @$data < $self->{'-min_size'}
1214 38 5 1 defined $self->{'-max_size'} and @$data > $self->{'-max_size'}
1256 30 1 2 exists $context->{'gather_valid_data'} and not defined $valid_data[$i]
1387 374 14 8 not exists $data->{$field} and $self->_field_matches("-may_ignore", $field)
1424 13 20 0 $spec_content && (match::simple::match($spec_content, ['*', 'all']) || match::simple::match($field, $spec_content))

or 2 conditions

line l !l condition
1014 9 0 $m ||= 0
1015 0 9 $s ||= 0
1226 26 15 $self->{'-items'} || []
1316 23 2 $self->{'-fields'} || []

or 3 conditions

line l !l&&r !l&&!r condition
230 0 0 4 ref $class or $class ne "Data::Domain"
244 867 205 0 $context ||= $self->_initial_inspect_context($data)
258 10 12 31 $self->{'-optional'} or exists $self->{'-default'}
12 2 29 $self->{'-optional'} or exists $self->{'-default'} or exists $self->{'-if_absent'}
421 180 60 0 $$GLOBAL_MSGS{$self->subclass}{$msg_id} || $Data::Domain::GLOBAL_MSGS->{'Generic'}{$msg_id}
431 18 426 0 $self->{'-name'} || $self->subclass
437 671 0 0 ref $self || $self
582 0 79 0 &does($_, 'Data::Domain') || &does($_, 'CODE') || !ref($_)
833 170 1 3 not ref $data or overload::Method($data, "\"\"")
984 0 2 4 not check_date(@$min) or _date_cmp(\@date, $min) < 0
990 0 1 2 not check_date(@$max) or _date_cmp(\@date, $max) > 0
1033 7 0 0 $t1->[0] <=> $t2->[0] || ($t1->[1] || 0) <=> ($t2->[1] || 0) || ($t1->[2] || 0) <=> ($t2->[2] || 0)
1218 26 9 8 $self->{'-items'} or $self->{'-all'}
9 6 2 $self->{'-items'} or $self->{'-all'} or $self->{'-any'}
1236 8 6 53 $has_invalid ||= $msgs[$i]
1252 3 5 25 $has_invalid ||= $msgs[$i]
1342 2 2 4 &does($val, "ARRAY") or &does($val, "Regexp")
4 4 0 &does($val, "ARRAY") or &does($val, "Regexp") or not ref $val
1349 2 0 0 &does($dom, "Data::Domain::List") or &does($dom, "CODE")

xor 4 conditions

line l&&r l&&!r !l&&r !l&&!r condition
296 2 1 2 1 builtin::blessed($data) xor $self->{'-blessed'}
300 1 0 2 0 not ref $data and $data->isa($data) xor $self->{'-package'}
304 0 0 0 0 builtin::is_weak($data) xor $self->{'-isweak'}
308 0 0 0 0 &Scalar::Util::readonly($data) xor $self->{'-readonly'}
312 0 0 0 0 &Scalar::Util::tainted($data) xor $self->{'-tainted'}
319 2 3 3 5 $data xor $self->{'-true'}
323 1 1 2 2 ref $data xor $self->{'-ref'}
687 3 3 3 1 defined $data xor $self->{'-defined'}