Test::...erarchy(3pm)
π 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::StdTest::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
- fedora 43: perl-Test-Run 0.0306-3.fc43 Β· (GPL-1.0-or-later OR Artistic-1.0-Perl) AND GPL-2.0-only AND MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms