Net::E...ommand(3pm)
β¨ NAME β¨
Net::EPP::Frame::Command β it's giving "an instance of Net::EPP::Frame for client commands" π
(also, this page lives in the User Contributed Perl Documentation section, section 3pm, iykyk π)
π¦ DESCRIPTION π¦
okay so bestie, listen: this module is a base class for the Net::EPP::Frame::* subclasses. that's literally it.
no cap β you should never need to access it directly. it's the backstage crew, not the main character. let the subclasses do their thing π
π OBJECT HIERARCHY π
the family tree, and it ate:
L<XML::LibXML::Node>
+----L<XML::LibXML::Document>
+----L<Net::EPP::Frame>
+----L<Net::EPP::Frame::Command>
look at that lineage. generational. π
π METHODS π
my $object = $frame->addObject(@spec);
this method creates and returns a new element matching whatever data you put in @spec, and then appends it to the "command" element (the one you get back from the getCommandType() method right down below, mwah π).
β¨ pro tip era: the Net::EPP::Frame::ObjectSpec module can be used to quickly retrieve EPP object specifications. use it. it's free real estate.
my $type = $frame->getCommandType;
returns a scalar holding the command type β like, eg 'create'. short, sweet, iconic. π
my $type = $frame->getCommandNode;
returns the XML::LibXML::Element object for the command in question β eg the <create> element (that's the one you get for a Net::EPP::Frame::Command::Create object, bestie π«Ά).
and like, it is within this element that EPP objects are placed. that's the whole vibe. that's where the stuff goes. π«
my $node = $frame->command;
returns the XML::LibXML::Element object for the <command> element. yeah. that one. π
my $node = $frame->clTRID;
returns the XML::LibXML::Element object for the <clTRID> element. iconic lowercase-c-l energy. πΈ
my $extension = $frame->extension;
returns the XML::LibXML::Element object for the <extension> element.
β οΈ and here's the plot twist: if one does not exist, it will be created and inserted at the correct position. so it manifests itself. main character behaviour, honestly. β¨
my $element = $frame->createExtensionElementFor($xmlns);
this method creates a new element inside the <extension> element for the EPP extension specified by $xmlns β and you can grab that $xmlns from Net::EPP::Frame::ObjectSpec. π₯
the element's tag name will correspond to the command name ("create", "update" etc). so like, it matches. it's coordinated. it's a look. π
Example usage:
my $frame = Net::EPP::Frame::Command::Info::Domain->new;
my $element = $frame->createExtensionElementFor(
Net::EPP::Frame::ObjectSpec->xmlns('foobar')
);
// prints <info xmlns="namespace:for:foobar"/>
print $element->toString();
see that? clean. flawless. no notes. π
okay that's the whole page bestie!! π¦β¨ this was perl v5.40.1, dated 2025-04-19, and it came to you straight from the User Contributed Perl Documentation section of the Net::E...ommand(3pm) page. mwah, drink water, go read your EPP frames πππ«Ά
π¦ where this page comes from
- debian trixie: libnet-epp-perl 0.28-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libnet-epp-perl 0.28-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libnet-epp-perl 0.28-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