Net::AMQP::Protocol(3pm)

Net::AMQP::Protocol3pm

Loading code of the amqp spec

Overview

This class serves as a loader for the auto-generated classes of the protocol.

Class methods

header

Returns a binary string representing the header of any AMQP communications

load_xml_spec

Pass in the XML filename. Reads in the AMQP XML specifications file, XML document node <amqp>, and generates subclasses of Net::AMQP::Protocol::Base for each frame type.

Names are normalized, as demonstrated by this example:

  <class name='basic'>
    <method name='consume-ok'>
      <field name='consumer tag'>
    </method>
  </class>

creates the class Net::AMQP::Protocol::Basic::ConsumeOk with the field accessor "consumer_tag()", allowing you to create a new object as such:

  my $method = Net::AMQP::Protocol::Basic::ConsumeOk->new(
      consumer_tag => 'blah'
  );
  print $method->consumer_tag() . "\n";
  if ($method->class_id == 60 && $method->method_name == 21) {
    # do something
  }

full_docs_to_dir

  Net::AMQP::Protocol->full_docs_to_dir($dir, $format);

Using the dynamically generated classes, this will create 'pod' or 'pm' files in the target directory in the following format:

  $dir/Net::AMQP::Protocol::Basic::Publish.pod
  (or with format 'pm')
  $dir/Net/AMQP/Protocol/Basic/Publish.pm

The directory will be created if it doesn't exist.

Releases

6 releases since Debian 8 (Jessie); the text changed 3 times.

  1. 8
  2. 9–10
  3. 11
  4. 12–13

Author

Eric Waters <[email protected]>

From libnet-amqp-perl 0.06~dfsg-4 in Debian 13 (Trixie). Parsed by carta from the page's man source.