Branch Coverage

blib/lib/Class/Role.pm
Criterion Covered Total %
branch 20 42 47.6


line true false branch
20 3 2 if ($_[0] and not $_[0] =~ /^-/)
28 0 0 unless $valid_param_keys{$_}
40 0 1 unless $valid_option_keys{$_}
44 1 2 if (ref $options{-'excludes'} eq 'ARRAY') { }
0 2 elsif ($options{-'excludes'} and not ref $options{-'excludes'}) { }
0 2 elsif ($options{-'excludes'}) { }
58 0 3 if (ref $param{-'methods'} eq 'ARRAY') { }
0 3 elsif ($param{-'methods'} and not ref $param{-'methods'}) { }
0 3 elsif ($param{-'methods'}) { }
69 23 3 if $_ ne 'import'
74 1 15 if $exclude{$method}
76 0 15 if (grep {$_ ne $package;} @{$$roles{$method};})
82 0 15 if (*{"${target}::$method";}{'CODE'})
86 5 10 if (${"${target}::__IS_ROLE__";}) { }
98 0 3 if (@conflicts)
99 0 0 if (not $options{-'conflict'} or lc $options{-'conflict'} eq 'die') { }
0 0 elsif (lc $options{-'conflict'} eq 'exclude') { }
0 0 elsif (lc $options{-'conflict'} eq 'keep') { }
0 0 elsif (lc $options{-'conflict'} eq 'replace' or lc $options{-'conflict'} eq 'mixin') { }
123 0 0 if (${"${target}::__IS_ROLE__";}) { }
149 2 0 if (ref $self and not $builtin_types{ref $self})