Help! Help! 8

Depth-first search

        sub AUTOLOAD {
          …
          my @stack = ($bottom_class);
          while (@stack) {
            my $class = pop @stack;
    
            next if $class eq __PACKAGE__;
            my $isa_var = $class . "::ISA";    
            push @stack, @{$isa_var};
            my $symbol_table = $class . "::";    
            for my $name (keys %{$symbol_table}) {
              my $func_name = $class . "::" . $name;
              next unless defined &{$func_name};
              $known_method{$name} ||= $class;
            }
          }
         …
       }