get_linear_isa#

Return the full ordered list of classes Perl would search for a method call on $class, starting with $class itself.

Synopsis#

my $list = mro::get_linear_isa($class); my $list = mro::get_linear_isa($class, $type);

The result is an array reference of package names. By default the list is produced using whichever algorithm is active for the class (dfs or c3). Pass an explicit "dfs" or "c3" as $type to force one without changing the class’s setting.

The list always begins with $class, even if $class has no stash yet — in that case the result is [ $class ]. UNIVERSAL and its ancestors are not included; they are searched implicitly after the returned list is exhausted.

Inconsistent C3 hierarchies (conflicting parent orderings across a diamond) croak with Inconsistent hierarchy during C3 merge of class '...'. Recursive @ISA chains deeper than 100 levels croak with Recursive inheritance detected in package '...'.