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{$_}
42 0 1 unless $valid_option_keys{$_}
46 1 2 if (ref $options{-'excludes'} eq 'ARRAY') { }
0 2 elsif ($options{-'excludes'} and not ref $options{-'excludes'}) { }
0 2 elsif ($options{-'excludes'}) { }
60 0 3 if (ref $param{-'methods'} eq 'ARRAY') { }
0 3 elsif ($param{-'methods'} and not ref $param{-'methods'}) { }
0 3 elsif ($param{-'methods'}) { }
72 23 3 if $_ ne 'import'
76 1 15 if $exclude{$method}
78 0 15 if (grep {$_ ne $package;} @{$$roles{$method};})
84 0 15 if (*{"${target}::$method";}{'CODE'})
88 5 10 if (${"${target}::__IS_ROLE__";}) { }
100 0 3 if (@conflicts)
101 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') { }
125 0 0 if (${"${target}::__IS_ROLE__";}) { }
165 2 0 if (ref $self and not $builtin_types{ref $self})