Net::A...l::Base(3pm)
π¦ Net::AMQP::Protocol::Base β the glow-up page (perl 3pm, bestie) π¦
okay so real talk, this is Net::AMQP::Protocol::Base, and it's the base class of all the auto-generated protocol classes. yes, the whole little nepo-baby family of protocol classes has a common ancestor and this is her. main character energy fr π
β¨ NAME β¨
Net::AMQP::Protocol::Base β the base class of auto-generated protocol classes. she's the blueprint, the blueprint-slash-mother-hen, the "everybody gets their traits from me" icon π
πΈ DESCRIPTION πΈ
okay so how do these subclasses even get born? head over to "load_xml_spec" in Net::AMQP::Protocol β that's the whole auto-generation situation, that's where the magic happens. this page is not the origin story, it's just the family tree. iykyk π§
π CLASS METHODS π
these are the class-level vibes. let's go through them one by one, no skips, we don't skip in this house π«Ά
β class_id
the class id straight from the specficiation. yes, that's how it's spelled in the original and i'm keeping it, character for character, don't @ me π
π₯ method_id
the method id from the specification. BUT β plot twist β in the case of a content <class> (think Basic, File or Stream), method_id is 0 for the virtual ContentHeader method. that's the whole trick: it lets you create a Header frame in much the same way you create a Method frame, except the method is the virtual ContentHeader. iconic behaviour honestly.
for example:
my $header_frame = Net::AMQP::Protocol::Basic::ContentHeader->new(
content_type => 'text/html'
);
print $header_frame->method_id(); # prints '0'
look at that 0 printing. slay. β¨
π frame_arguments
contains an ordered arrayref of the fields that make up a frame for this method. order matters bestie, it's giving very "seating chart at the wedding" energy. example:
Net::AMQP::Protocol::Channel::Open->frame_arguments([
out_of_band => 'short_string'
]);
this is what the Net::AMQP::Frame subclasses use to (de)serialize raw binary data. and plot twist number two: each of these fields is also an accessor for the class objects. multi-hyphenate π
π class_spec
contains the hashref that the load_xml_spec() call generated for this class. it's the receipts, basically.
π method_spec
same as above, but for this method. yes bestie, it's the method's own little hashref. periodt.
π¦ OBJECT METHODS π¦
πΈ frame_wrap
returns a Net::AMQP::Frame subclass object that wraps the given object, if possible. note the "if possible" β we're not promising anything, we're just being honest about our capabilities π
π SEE ALSO π
Net::AMQP::Protocol
go read that one, she's the cool older sister of this page.
π COPYRIGHT π
Copyright (c) 2009 Eric Waters and XMission LLC (http://www.xmission.com/). All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module. read it, bestie, it's good for you π
π AUTHOR π
Eric Waters <ewaters@gmail.com>
π POD ERRORS π
not me having to tell you this but β hey! the above document had some coding errors, and they're explained below:
Around line 61:
=back without =over
that's it, that's the error. a whole =back with no =over to back. we've all been there honestly π
and that's the page, bestie!! this was perl v5.42.0, dated 2016-11-28 β yes, she's been around a minute, but she's still serving looks. mwah πβ¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-Net-AMQP 0.06-bp160.1.4 Β· Artistic-1.0 or GPL-1.0+
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms