Net::E...ommand(3pm)

πŸ“¦
version 0.28 Β· 4 versions
, in debian trixie, ubuntu resolute, ubuntu stonking

✨ 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