# man > Class::ISA

yaml
---
type: CommandReference
command: Class::ISA
mode: perldoc
section: "3pm"
source: perldoc
---
## Quick Reference

- `Class::ISA::super_path($CLASS)` — Get ordered list of superclasses (excluding $CLASS and UNIVERSAL), with no duplicates
- `Class::ISA::self_and_super_path($CLASS)` — Like `super_path`, but includes $CLASS as first element
- `Class::ISA::self_and_super_versions($CLASS)` — Return a hash mapping $CLASS and its superclasses to their `$VERSION` (or undef)

## Name

Report the search path for a class's ISA tree

## Synopsis

perl
# Suppose you go: use Food::Fishstick, and that uses and
# inherits from other things, which in turn use and inherit
# from other things.  And suppose, for sake of brevity of
# example, that their ISA tree is the same as:

@Food::Fishstick::ISA = qw(Food::Fish  Life::Fungus  Chemicals);
@Food::Fish::ISA = qw(Food);
@Food::ISA = qw(Matter);
@Life::Fungus::ISA = qw(Life);
@Chemicals::ISA = qw(Matter);
@Life::ISA = qw(Matter);
@Matter::ISA = qw();

use Class::ISA;
print "Food::Fishstick path is:\n ",
      join(", ", Class::ISA::super_path('Food::Fishstick')),
      "\n";

# That prints:
# Food::Fishstick path is:
#  Food::Fish, Food, Matter, Life::Fungus, Life, Chemicals
## Options (Functions)

- `Class::ISA::super_path($CLASS)` — Returns the ordered list of classes Perl would search to find a method, with no duplicates. Does not include $CLASS or UNIVERSAL. If the ISA tree contains cycles, the algorithm avoids revisiting classes.
- `Class::ISA::self_and_super_path($CLASS)` — As above, but $CLASS is the first element of the list.
- `Class::ISA::self_and_super_versions($CLASS)` — Returns a hash whose keys are $CLASS and its superclasses and whose values are the contents of each class's `$VERSION` (or undef if none). This function is intended as an example; see its source for details.

**Notes:**
- `Class::ISA` does not export anything; you must call functions with the `Class::ISA::` prefix.
- It is a package, not a class.
- The functions lack memoization; they re-read `@ISA` each time. Changing `@ISA` at runtime is strongly discouraged.
- If a method is not found in the ISA tree, Perl falls back to `UNIVERSAL`. To include it, append `'UNIVERSAL'` to the list returned by `super_path`.
- Cyclic ISA trees are handled by never revisiting a class.

## Examples

The example in the synopsis above demonstrates the use of `Class::ISA::super_path`. For a quick start:

perl
use Class::ISA;
my @path = Class::ISA::super_path('My::Class');
To include the class itself:

perl
my @full_path = Class::ISA::self_and_super_path('My::Class');
## See Also

- [Class::ISA on metacpan](https://metacpan.org/pod/Class::ISA)
- Perl's built-in `@ISA` and method resolution
- [UNIVERSAL](https://perldoc.perl.org/perlobj#UNIVERSAL)