Net::S...::Frame(3pm)
π 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 π
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
- debian trixie: libnet-stomp-perl 0.62-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libnet-stomp-perl 0.62-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-stomp-perl 0.62-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-stomp-perl 0.62-1 Β· 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