Analiz...nceTree(3pm)

πŸ“¦
version 1.25.5 Β· 4 versions
, in ubuntu resolute, ubuntu stonking

✨ NAME ✨

Analizo::Metric::DepthOfInheritanceTree β€” it's the Depth of Inheritance Tree (aka DIT) metric, bestie πŸ’…


πŸ’– DESCRIPTION πŸ’–

okay so this metric is doing a whole genealogy deep-dive 🌳✨ its entire job is computing the longest path from a module all the way up to the class hierarchy root. like, how many ancestors does this thing have, fr fr. and it's not out here inventing rules β€” the math is based on a real article, and the article is:

An empirical study of aspect-oriented metrics by Eduardo Kessler Piveta, Ana Moreira, Marcelo Soares Pimenta, Joao Araujo, Pedro Guerreiro and R. Tom Price πŸ“šπŸ«Ά

now bestie, go look at how that article adapted the paragraph about Depth of Inheritance Tree β€” I'm quoting it here so you don't have to go digging:

consider a function s(x) : Module -> Module that computes the super-class or super-aspect of a giver module (yes, "giver module", that's what it says, I don't make the rules πŸ™ˆ), and then the value of DIT is literally just:

DIT(m) = DIT(s(m)) + 1, ifc m != rootClass
DIT(m) = 0, otherwise.

so like: if you're not the root class, you're your super-thing's DIT plus one, iconic recursion behaviour 🧚 and if you are the root? you're a zero, no cap, and that's the whole vibe check πŸ‘‘

ngl the ifc in there is exactly as written in the source β€” not a typo I introduced, I promise, we keep it verbatim around here πŸ’€

okay that's the whole page, short and slay 🌸 this was the Analizo::Metric::DepthOfInheritanceTree(3pm) page from the User Contributed Perl Documentation, and the little footer down there says perl v5.40.1 dated 2025-12-13 β€” so yeah, that's the version and the date, mwah, bye bestie πŸŽ€πŸ’–πŸ¦‹

πŸ“¦ where this page comes from