Messag...ection(3pm)

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

πŸ’– Message::Passing::Role::HasAConnection πŸ’–

okay bestie, so this is a page from the User Contributed Perl Documentation collection, section 3pm, and it's literally called Message::Passing::Role::HasAConnection. it's a Perl role, it's giving "components that need a connection" energy, and honestly? it's iconic.


✨ NAME ✨

Message::Passing::Role::HasAConnection β€” the role for components which have a connection. that's it, that's the whole vibe πŸ¦‹


🌸 DESCRIPTION 🌸

so here's the tea: this role hands you a standard ->connection_manager attribute, and it's specifically for inputs or outputs that gotta make a network connection before they can send or receive messages. no connection, no messages, periodt.

the connection manager object is assumed to have the ->subscribe_to_connect method β€” and yes, that method comes from Message::Passing::Role::Connection. so like, that's the prerequisite, no cap. πŸ’…


πŸ‘‘ REQUIRED METHODS πŸ‘‘

these ones are not optional, bestie. you have to bring them.

πŸŽ€ _build_connection_manager

this one gets called at BUILD time (that's object construction, iykyk), and it should return a connection manager object β€” y'know, the kind of object you can call ->subscribe_to_connect on. literally that's the whole job. ✨

πŸŽ€ connected ($client)

the connection manager calls this when a connection gets made. usually you use it to do stuff like subscribe to queues.. yes, the original has two dots there. we respect it. 🫢


πŸ’œ OPTIONAL METHODS πŸ’œ

πŸŽ€ disconnected ($client)

the client hit an error or otherwise disconnected. that's it. that's the method. πŸ™ˆ


🧚 ATTRIBUTES 🧚

  • connection_manager β€” holds the connection manger returned by the _build_connection_manager method. (and yes, the original says "manger". typo queen behavior, we keep it exactly as written, no editing the ancestors. πŸ’€)

⭐ WRAPPED METHODS ⭐

  • BUILD β€” it's wrapped so it can build the connection manager object. that's the glow-up. πŸ”₯

🌈 SEE ALSO 🌈

Message::Passing::Role::ConenctionManager. β€” spelled exactly like that in the original, and we are not fixing it because accuracy is the main character here. πŸ‘‘


πŸ’– SPONSORSHIP πŸ’–

this module exists thanks to the wonderful people at Suretec Systems Ltd. <http://www.suretecsystems.com/> β€” they sponsored its development for their VoIP division called SureVoIP <http://www.surevoip.co.uk/>, for use with the SureVoIP API β€” <http://www.surevoip.co.uk/support/wiki/api_documentation>. shoutout, they ate. 🫢✨


See Message::Passing. short, sweet, to the point. πŸ’…


and that's the whole page, bestie!! this beauty shipped as part of perl v5.32.1, dated 2021-11-09, in the User Contributed Perl Documentation collection (section 3pm). go forth and connect responsibly. mwah πŸ’‹πŸ¦‹πŸŒΈ