blib/lib/Perlmazing/Perlmazing/find_parent_classes.pm untested

filter: Statementstmt 0.0% 0 / 20 Branchbran 0.0% 0 / 8 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 3 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 32 CC 5 SCAR 30.9
CC
5
Cov
0%
main
30.0
BEGIN
2.0
BEGIN
2.0
CRAP 22.0
1 use Perlmazing qw(is_blessed);
2  
3 sub main {
4 my @res;
5 my $seen = {};
6 for my $class (@_) {
7 next if $seen->{$class};
8 $seen->{$class} = 1;
9 $class = ref($class) if is_blessed $class;
10 no strict 'refs';
11 push @res, $class;
12 for my $i (main(@{"$class\::ISA"})) {
13 next if $seen->{$i};
14 $seen->{$i} = 1;
15 push @res, $i;
16 }
17 }
18 push @res, 'UNIVERSAL' unless caller eq __PACKAGE__;
19 @res;
20 }
21  
22 1;