Zonema...ception(3pm)

πŸ“¦ version 1.0.16, in ubuntu jammy

πŸ’– NAME πŸ’–

Zonemaster::Exception β€” bestie, it's the base class for Zonemaster exceptions πŸŽ€

Like, every other exception in the Zonemaster fam inherits its whole vibe from this one. It's the mother of all oopsies. The blueprint. The blueprint of "something went wrong bestie" πŸ’…


✨ SYNOPSIS ✨

die Zonemaster::Exception->new({ message => "This is an exception" });

That's it. That's the whole thing. You just die with a new exception object and pass it a message in a hashref, and boom πŸ’₯ you're throwing an exception like a main character.


πŸ¦‹ ATTRIBUTES πŸ¦‹

  • message β€” a string attribute, babes. It holds a message for possible human consumption πŸ‘€ like it's literally a note to whoever's reading the error later. Feed it words, it holds the words. That's the whole job. Slay.

🌸 METHODS 🌸

  • string() β€” this one stringifies the object by handing you back the message attribute. And here's the tea: stringification is overloaded to this ✨ so when Perl needs to turn your exception into a string, it doesn't fumble β€” it just calls this and gives you the message. No cap, it just works πŸ’…

fr fr, that's the entire module. Small, iconic, does exactly one thing and does it well 🫢

Okay so the ~vibes~ on this one: it's from the User Contributed Perl Documentation, living in the 3pm section, shipped with perl v5.32.0, and this particular page is dated 2021-01-06 πŸ’œ

Zonemaster::Exception β€” periodt. πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from