Net::S...::Frame(3pm)

πŸ“¦
version 0.62 Β· 5 versions
, in debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay so bestie, meet Net::Stomp::Frame β€” A STOMP Frame. that's the whole name, no notes. it lives in the User Contributed Perl Documentation under section 3pm, and it's giving tiny-but-mighty, lowkey essential energy. πŸŽ€


🌸 SYNOPSIS 🌸

the whole vibe in four-ish lines:

use Net::Stomp::Frame;
my $frame = Net::Stomp::Frame->new( {
  command => $command,
  headers => $headers,
  body    => $body,
} );
my $frame  = Net::Stomp::Frame->parse($string);
my $string = $frame->as_string;

see? build one, parse one, stringify one. that's the trilogy. πŸ¦‹


πŸ¦‹ DESCRIPTION πŸ¦‹

This module encapulates a Stomp frame. (yes, "encapulates" β€” that is literally the word on the page, we are keeping it, do not come for me πŸ™ˆ)

A Stomp frame is made of three little pieces, and honestly? the way it's so simple:

  • a command
  • a series of headers
  • a body

For all the juicy protocol details, go look at https://stomp.github.io/ β€” it's all there, iykyk. ✨


πŸ‘‘ METHODS πŸ‘‘

🫢 new

Create a brand new Net::Stomp::Frame object, like so:

my $frame = Net::Stomp::Frame->new( {
  command => $command,
  headers => $headers,
  body    => $body,
} );

fresh frame, fresh start, main character energy fr fr. πŸ’…

πŸŽ€ parse

Create a new Net::Somp::Frame given a string containing the serialised frame:

my $frame  = Net::Stomp::Frame->parse($string);

(and yes, Net::Somp::Frame is spelled exactly like that on the page β€” that's the typo, not me, i am simply the messenger 🫑)

✨ as_string

Create a string containing the serialised frame representing the frame:

my $string = $frame->as_string;

turn your lil object back into text. slay. πŸ”₯

πŸ’œ command

Get or set the frame command.

🌈 body

Get or set the frame body.

⭐ headers

Get or set the frame headers, as a hashref. and okay, this is the important part: All following methods are just shortcuts into this hashref. so every single one below? it's just reaching into that hash for you. convenient bestie behaviour.

πŸ“ destination

Get or set the "destination" header.

🧚 content_type

Get or set the "content-type" header.

πŸ¦‹ content_length

Get or set the "content-length" header.

πŸ’– exchange

Get or set the "exchange" header.

πŸŽ€ message_id

Get or set the "message-id" header.

🌸 reply_to

Get or set the "reply-to" header.


πŸ’€ SEE ALSO πŸ’€

  • Net::Stomp. β€” the main one, the parent, the icon. πŸ‘‘

πŸ‘‘ AUTHOR πŸ‘‘

  • Leon Brocard <acme@astray.com>.

🌟 CONTRIBUTORS 🌟

  • Gianni Ceccarelli <dakkar@thenautilus.net>

Copyright (C) 2006, Leon Brocard

This module is free software; you can redistribute it or modify it under the same terms as Perl itself.


ok that's the whole page bestie, nothing skipped, every single method accounted for, periodt. πŸ’–

and for the cutest little sign-off: this page came to you as Net::S...::Frame(3pm) from perl v5.38.2, dated 2024-02-24. mwah. 🫢✨

πŸ“¦ where this page comes from