Branch Coverage

blib/lib/Class/Meta/Attribute.pm
Criterion Covered Total %
branch 62 64 96.8


line true false branch
85 2 135 unless UNIVERSAL::isa($caller, 'Class::Meta') or UNIVERSAL::isa($caller, 'Class::Meta::Attribute')
91 1 134 if @_ % 2
97 2 132 unless $p{'name'}
100 1 131 if $p{'name'} =~ /\W/
110 30 232 $p{$_} ? :
114 3 128 if not delete $p{'override'} and exists $$class{'attrs'}{$p{'name'}}
119 61 67 if (exists $p{'view'}) { }
121 3 7 unless $p{'view'} == 4 or $p{'view'} == 2 or $p{'view'} == 3 or $p{'view'} == 1
133 12 113 if (exists $p{'authz'}) { }
135 1 7 unless $p{'authz'} == 1 or $p{'authz'} == 2 or $p{'authz'} == 3 or $p{'authz'} == 4
147 45 79 if (exists $p{'create'}) { }
149 1 37 unless $p{'create'} == 1 or $p{'create'} == 2 or $p{'create'} == 3 or $p{'create'} == 4
161 4 119 if (exists $p{'context'}) { }
163 1 3 unless $p{'context'} == 2 or $p{'context'} == 1
173 1 121 if exists $p{'is'}
175 1 121 unless $p{'type'}
177 6 115 unless (eval { do { 'Class::Meta::Type'->new($p{'type'}) } })
178 1 5 unless my $pkg = $type_pkg_for{$p{'type'}}
181 0 5 if $@
186 68 52 if (exists $p{'default'})
188 5 63 if ref $p{'default'} eq 'CODE'
197 116 4 if ($p{'view'} > 1)
198 113 3 unless $p{'view'} == 3
200 113 3 if ($p{'view'} > 2)
202 110 3 if $p{'view'} == 4
365 6 252 if (my $code = $_[0]{'_def_code'})
386 1 103 unless my $code = $$self{'_get'}
408 3 192 unless my $code = $$self{'_set'}
438 1 79 unless UNIVERSAL::isa($caller, 'Class::Meta') or UNIVERSAL::isa($caller, 'Class::Meta::Attribute')
447 75 4 if $create != 1
451 79 0 if ($$self{'authz'} >= 2)
456 75 4 if ($$self{'authz'} >= 3)