Test::...erarchy(3pm)

πŸ“¦
version 0.0306 Β· 2 versions
, in fedora 43

πŸ’– NAME πŸ’–

Test::Run::Class::Hierarchy β€” bestie, this lil module hands you a list of super-classes, all lined up in topological order. Yes, the fancy word. Yes, it slays. ✨


🌸 SYNOPSIS 🌸

okay so this is literally how you use it, no cap:

use Test::Run::Class::Hierarchy;

my $base_classes = hierarchy_of("MyClass::Sub::Sub::Sub");

my $base_classes_rev = rev_hierarchy_of("MyClass::Sub::Sub::Sub");

see? two whole functions. that's the vibe. πŸ’…


πŸ¦‹ DESCRIPTION πŸ¦‹

It returns a list of classes in the current namespace. that's it, that's the whole personality. πŸŽ€

⚠️ but bestie, listen β€” it caches the results. so don't come for it later being like "why didn't it update", because it told you. it's giving "I remember everything" main character energy and honestly? respect.

πŸ‘‘ EXPORTS πŸ‘‘

✨ my [@list] = hierarchy_of($class) ✨

Returns a list of the classes in the hierarchy of the class, going from bottom to top. so like, you start at the little baby subclass and climb your way up to the ancestors. 🧚 ascending, as one does.

✨ my [@list] = rev_hierarchy_of($class) ✨

Returns the classes from top to bottom. same list, flipped. the reverse. the remix. πŸ”₯


πŸ“œ LICENSE πŸ“œ

This file is licensed under the MIT X11 License:

http://www.opensource.org/licenses/mit-license.php

(go read it, it's short, it's iconic, it's giving freedom with conditions πŸ’œ)


🌟 CREDITS 🌟

The code was inspired by the code from Damian Conway's Class::Std, but is not inclusive of it. like, inspired-by, not copy-pasted-from. we keep it classy. πŸ™ˆ

Written by Shlomi Fish: <http://www.shlomifish.org/>. 🫢


πŸ” SEE ALSO πŸ”

  • Class::Std
  • Test::Run

and that's the whole page, bestie!! this one's from <bold-ish>perl v5.42.0</bold-ish>, dated <bold-ish>2025-07-25</bold-ish>, and it lives in the User Contributed Perl Documentation section under the iconic nickname Test::...erarchy(3pm) because the terminal was simply not ready for that full name. periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from