Analiz...Objects(3pm)

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

πŸ’– 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 design by 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