UR::Ob...ecated(3pm)

πŸ“¦
version 0.470 Β· 2 versions
, in debian bookworm, ubuntu jammy, ubuntu noble

πŸ’– 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 $type and it hands you back $sub_ref, the sub doing the message-handling for that type.
  • Call it with $type and $sub_ref and 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