UR::Ob...ecated(3pm)
π NAME π
UR::Ob...ecated β yes bestie, the name is literally spelled with the ... in it, that's not me being dramatic, that's just how it is. It's a Perl module page, 3pm coded, and it's here to tell you about exactly one method. Short and sweet, we love a minimal queen. β¨
π message_callback π
Okay so first, the receipts β here's how you call her, both ways:
$sub_ref = UR::ModuleBase->message_callback($type);
UR::ModuleBase->message_callback($type, $sub_ref);
So what's happening here? This method returns the subroutine that handles messages of a specific type β and if you feel like it, you can optionally set that subroutine too. It's giving "read it and write it, pick your fighter." π¦
- Call it with just
$typeand it hands you back$sub_ref, the sub doing the message-handling for that type. - Call it with
$typeand$sub_refand you're setting that handler to the sub you passed in.
Both forms live on UR::ModuleBase, so that's your class method right there. No cap. π
Fr fr that's the whole page β one method, two signatures, zero filler. Sometimes the icon is concise. π
This lil' slice of Perl was documented as part of perl v5.32.1, dated 2022-01-17, and it lives in the User Contributed Perl Documentation collection. Go forth and handle your messages, bestie π«ΆπΈ
π¦ where this page comes from
- debian bookworm: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libur-perl 0.470+ds-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms