Branch Coverage

blib/lib/Attribute/Contract.pm
Criterion Covered Total %
branch 24 32 75.0


line true false branch
36 18 6 unless $import{-'names'}{'requires'}
40 12 4 unless $import{-'names'}{'ensures'}
73 2 7 unless $package->isa($class)
75 0 7 unless my $code_ref = $package->can($method)
80 0 8 unless $attr =~ contract_attr_re()
102 0 15 if exists $attrs{refaddr $code_ref}
103 7 8 if exists $modifiers{"${package}::$name"}
108 8 0 if (@attr)
114 2 0 if (exists $modifiers{$key})
119 2 0 if (@$base_contract == @$contract)
121 1 1 if join(',', sort(@$base_contract)) eq join(',', sort(@$contract))
133 0 8 unless $attr =~ contract_attr_re()
138 5 3 $type eq contract_requires_name() ? :
152 1 14 if $symcache{join $;, $package, $ref}
159 0 61 unless ref \$sym eq 'GLOB'
162 14 47 if *{$sym;}{$type} and *{$sym;}{$type} == $ref