Branch Coverage

blib/lib/Mo/utils.pm
Criterion Covered Total %
branch 64 64 100.0


line true false branch
21 1 10 unless (exists $self->{$key})
25 5 5 if (ref $self->{$key} ne "ARRAY")
38 1 3 unless (exists $self->{$key})
45 1 1 unless ($obj->isa($class))
56 1 4 unless (exists $self->{$key})
62 1 1 unless (@{$self->{$key};})
72 2 4 if _check_key($self, $key)
74 2 2 if (not $self->{$key} =~ /^\d+$/ms or $self->{$key} != 0 and $self->{$key} != 1)
86 2 2 if _check_key($self, $key)
88 1 1 if (ref $self->{$key} ne "CODE")
100 2 5 if _check_key($self, $key)
102 3 2 unless (&blessed($self->{$key}))
112 1 2 ref $self->{$key} eq '' ? :
2 1 ref $self->{$key} ne '' ? :
116 1 1 unless ($self->{$key}->isa($class))
128 2 3 if _check_key($self, $key)
130 1 2 if (length $self->{$key} > $max_length)
142 2 5 if _check_key($self, $key)
144 1 4 unless ($self->{$key} =~ /^[-+]?\d+(\.\d+)?$/ms)
162 1 2 if ($item_hr->{$item} > 1)
173 1 3 if _check_key($self, $key)
175 1 2 unless (defined $regexp)
178 1 1 unless ($self->{$key} =~ /^$regexp/ms)
191 2 1 unless (exists $self->{$key} and defined $self->{$key})
201 1 3 if _check_key($self, $key)
203 1 2 unless (defined $string_base)
206 1 1 unless ($self->{$key} =~ /^$string_base/)
219 1 5 if _check_key($self, $key)
221 1 4 unless (defined $strings_ar)
224 1 3 if (ref $strings_ar ne "ARRAY")
227 1 2 if (&none(sub { $self->{$key} eq $_; } , @{$strings_ar;}))
240 13 30 unless (exists $self->{$key} and defined $self->{$key})