Analiz...Objects(3pm)
π NAME π
okay so bestie, meet Analizo::Metric::CouplingBetweenObjects β that's the Coupling Between Objects metric, aka CBO π
she lives in the User Contributed Perl Documentation, section 3pm, which is just the lil neighborhood where all the Perl modules hang out β¨
It's a metric. A metric that measures coupling. Between objects. The name was not playing games π₯
πΈ DESCRIPTION πΈ
So how does CBO do her thing? The calculation isn't vibes-based, ngl β it's built on a whole article. And what does it actually count? The number of calls to other modules. That's it. That's the metric. Short king behavior, but it matters. π
The article in question:
A metrics suite for object oriented designby Shyam R. Chidamber and Chris F. Kemerer π
If you're gonna go read it (which, iconic, love that for you), check out the paragraph about Coupling Between Objects specifically β that's the one this module is doing karaoke of.
Theoretical Basis: here's the whole point of CBO, bestie π¦ β an object is coupled</> to another object whenever one of them acts on the other, meaning methods of one go and use a method or an instance variable of the other. Simple as that.
And because objects of the same class all have the same properties (they're the same class, they share the same DNA π§¬), two classes are coupled when methods declared in one class use methods or instance variables defined by the other class. So it's not just object-to-object, it's class-to-class too. The way that coupling just travels π
lowkey the whole CBO thing is just: are these two tangled up with each other? If yes, they're coupled. Count it. no cap π
and that's the entire metric, babe β no options, no flags, no exit statuses, no env vars, nothing sneaky hiding in here. Just the definition and the receipts from the article. Periodt. π
βΏ sign-off βΏ
This little page came to you via User Contributed Perl Documentation, built with perl v5.40.1, dated 2025-12-13. slay, go forth and measure your coupling π«ΆπΈ
π¦ where this page comes from
- ubuntu resolute: analizo 1.25.5-3 Β· GPL-3.0-or-later
- ubuntu stonking: analizo 1.25.5-3 Β· GPL-3.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms