Branch Coverage

blib/lib/Object/Enum.pm
Criterion Covered Total %
branch 34 38 89.4


line true false branch
39 6 5 unless shift()
127 23 0 unless $class->can("is_$value")
134 2 12 if (ref $arg eq 'ARRAY')
138 1 13 unless $$arg{'values'}
1 13 unless (@{[] unless $$arg{'values'};})
142 11 2 unless exists $$arg{'unset'}
143 6 7 unless exists $$arg{'default'}
144 12 1 unless exists $$arg{'readonly'}
146 1 1 unless ($$arg{'unset'} or defined $$arg{'default'})
150 1 11 if (defined $$arg{'default'} and not grep({$_ eq $$arg{'default'};} @{$$arg{'values'};}))
170 0 9 unless defined $self->value
197 7 11 ref $class ? :
200 1 17 if @_
207 1 6 if $self->_readonly
234 0 1 unless ref $values eq 'ARRAY'
254 10 49 if (@_ and not $self->_readonly)
256 0 10 unless defined $val
257 1 9 unless ($self->_values->{$val})
284 2 1 unless ($self->_unset)