.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.40) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" ======================================================================== .\" .IX Title "Net::EPP::Frame 3pm" .TH Net::EPP::Frame 3pm "2021-01-09" "perl v5.32.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" Net::EPP::Frame \- An EPP XML frame system built on top of XML::LibXML. .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 7 \& #!/usr/bin/perl \& use Net::EPP::Client; \& use Net::EPP::Frame; \& use Net::EPP::ObjectSpec; \& use Digest::MD5 qw(md5_hex); \& use Time::HiRes qw(time); \& use strict; \& \& # \& # establish a connection to an EPP server: \& # \& my $epp = Net::EPP::Client\->new( \& host => \*(Aqepp.registry.tld\*(Aq, \& port => 700, \& ssl => 1, \& dom => 1, \& ); \& \& my $greeting = $epp\->connect; \& \& # \& # log in: \& # \& my $login = Net::EPP::Frame::Command::Login\->new; \& \& $login\->clID\->appendText($userid); \& $login\->pw\->appendText($passwd); \& \& # \& # set the client transaction ID: \& # \& $login\->clTRID\->appendText(md5_hex(Time::HiRes::time().$$)); \& \& # \& # check the response from the log in: \& # \& my $answer = $epp\->request($login); \& \& my $result = ($answer\->getElementsByTagName(\*(Aqresult\*(Aq))[0]; \& if ($result\->getAttribute(\*(Aqcode\*(Aq) != 1000) { \& die("Login failed!"); \& } \& \& # \& # OK, let\*(Aqs do a domain name check: \& # \& my $check = Net::EPP::Frame::Command::Check\->new; \& \& # \& # get the spec from L: \& # \& my @spec = Net::EPP::Frame::ObjectSpec\->spec(\*(Aqdomain\*(Aq); \& \& # \& # create a domain object using the spec: \& # \& my $domain = $check\->addObject(@spec); \& \& # \& # set the domain name we want to check: \& # \& my $name = $check\->createElement(\*(Aqdomain:name\*(Aq); \& $name\->appendText(\*(Aqexample.tld\*(Aq); \& \& # \& # set the client transaction ID: \& # \& $check\->clTRID\->appendText(md5_hex(time().$$)); \& \& # \& # assemble the frame: \& # \& $domain\->addChild($name); \& \& # \& # send the request: \& # \& my $answer = $epp\->request($check); \& \& # and so on... .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" \&\s-1EPP\s0 is the Extensible Provisioning Protocol. \s-1EPP\s0 (defined in \s-1RFC 4930\s0) is an application layer client-server protocol for the provisioning and management of objects stored in a shared central repository. Specified in \s-1XML,\s0 the protocol defines generic object management operations and an extensible framework that maps protocol operations to objects. As of writing, its only well-developed application is the provisioning of Internet domain names, hosts, and related contact details. .PP \&\s-1EPP\s0 uses \s-1XML\s0 documents called \*(L"frames\*(R" send data to and from clients and servers. This module implements a subclass of the XML::LibXML::Document module that simplifies the process of creation of these frames. It is designed to be used alongside the Net::EPP::Client module. .SH "OBJECT HIERARCHY" .IX Header "OBJECT HIERARCHY" .Vb 3 \& L \& +\-\-\-\-L \& +\-\-\-\-L .Ve .SH "USAGE" .IX Header "USAGE" As a rule, you will not need to create Net::EPP::Frame objects directly. Instead, you should use one of the subclasses included with the distribution. The subclasses all inherit from Net::EPP::Frame. .PP Net::EPP::Frame is itself a subclass of XML::LibXML::Document so all the methods available from that class are also available to instances of Net::EPP::Frame. .PP The available subclasses of Net::EPP::Frame exist to add any additional elements required by the \s-1EPP\s0 specification. For example, the frame must contain the and frames, so when you create a new Net::EPP::Frame::Command::Login object, you get these already defined. .PP These classes also have convenience methods, so for the above example, you can call the \f(CW\*(C`$login\->clID\*(C'\fR and \f(CW\*(C`$login\->pw\*(C'\fR methods to get the XML::LibXML::Node objects correesponding to those elements. .SS "\s-1RATIONALE\s0" .IX Subsection "RATIONALE" You could just as easily construct your \s-1EPP\s0 frames from templates or just lots of \f(CW\*(C`printf()\*(C'\fR calls. But using a programmatic approach such as this strongly couples the validity of your \s-1XML\s0 to the validity of your program. If the process by which your \s-1XML\s0 is built is broken, \fIyour program won't run\fR. This has to be a win. .SH "ADDITIONAL METHODS" .IX Header "ADDITIONAL METHODS" .Vb 1 \& my $str = $frame\->formatTimeStamp($timestamp); .Ve .PP This method returns a scalar in the required format (defined in \s-1RFC 3339\s0). This is a convenience method. .PP .Vb 2 \& my $node = $frame\->getNode($id); \& my $node = $frame\->getNode($ns, $id); .Ve .PP This is another convenience method. It uses \f(CW$id\fR with the \&\fI\f(BIgetElementsByTagName()\fI\fR method to get a list of nodes with that element name, and simply returns the first XML::LibXML::Element from the list. .PP If \f(CW$ns\fR is provided, then \fI\f(BIgetElementsByTagNameNS()\fI\fR is used. .PP .Vb 1 \& my $binary = $frame\->header; .Ve .PP Returns a scalar containing the frame length packed into binary. This is only useful for low-level protocol stuff. .PP .Vb 1 \& my $data = $frame\->frame; .Ve .PP Returns a scalar containing the frame header (see the \fI\f(BIheader()\fI\fR method above) concatenated with the \s-1XML\s0 frame itself. This is only useful for low-level protocol stuff. .SH "AVAILABLE SUBCLASSES" .IX Header "AVAILABLE SUBCLASSES" .IP "Net::EPP::Frame, the base class" 4 .IX Item "Net::EPP::Frame, the base class" .PD 0 .IP "Net::EPP::Frame::Command, for \s-1EPP\s0 client command frames" 4 .IX Item "Net::EPP::Frame::Command, for EPP client command frames" .IP "Net::EPP::Frame::Command::Check, for \s-1EPP\s0 client commands" 4 .IX Item "Net::EPP::Frame::Command::Check, for EPP client commands" .IP "Net::EPP::Frame::Command::Create, for \s-1EPP\s0 client commands" 4 .IX Item "Net::EPP::Frame::Command::Create, for EPP client commands" .IP "Net::EPP::Frame::Command::Delete, for \s-1EPP\s0 client commands" 4 .IX Item "Net::EPP::Frame::Command::Delete, for EPP client commands" .IP "Net::EPP::Frame::Command::Info, for \s-1EPP\s0 client commands" 4 .IX Item "Net::EPP::Frame::Command::Info, for EPP client commands" .IP "Net::EPP::Frame::Command::Login, for \s-1EPP\s0 client commands" 4 .IX Item "Net::EPP::Frame::Command::Login, for EPP client commands" .IP "Net::EPP::Frame::Command::Logout, for \s-1EPP\s0 client commands" 4 .IX Item "Net::EPP::Frame::Command::Logout, for EPP client commands" .IP "Net::EPP::Frame::Command::Poll, for \s-1EPP\s0 client commands" 4 .IX Item "Net::EPP::Frame::Command::Poll, for EPP client commands" .IP "Net::EPP::Frame::Command::Renew, for \s-1EPP\s0 client commands" 4 .IX Item "Net::EPP::Frame::Command::Renew, for EPP client commands" .IP "Net::EPP::Frame::Command::Transfer, for \s-1EPP\s0 client commands" 4 .IX Item "Net::EPP::Frame::Command::Transfer, for EPP client commands" .IP "Net::EPP::Frame::Command::Update, for client commands" 4 .IX Item "Net::EPP::Frame::Command::Update, for client commands" .IP "Net::EPP::Frame::Greeting, for \s-1EPP\s0 server greetings" 4 .IX Item "Net::EPP::Frame::Greeting, for EPP server greetings" .IP "Net::EPP::Frame::Hello, for \s-1EPP\s0 client greetings" 4 .IX Item "Net::EPP::Frame::Hello, for EPP client greetings" .IP "Net::EPP::Frame::Response, for \s-1EPP\s0 server response frames" 4 .IX Item "Net::EPP::Frame::Response, for EPP server response frames" .PD .PP Each subclass has its own subclasses for various objects, for example Net::EPP::Frame::Command::Check::Domain creates \f(CW\*(C`\*(C'\fR frame for domain names. .PP Coverage for all combinations of command and object type is not complete, but work is ongoing. .SH "AUTHOR" .IX Header "AUTHOR" CentralNic Ltd (http://www.centralnic.com/). .SH "COPYRIGHT" .IX Header "COPYRIGHT" This module is (c) 2016 CentralNic Ltd. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. .SH "SEE ALSO" .IX Header "SEE ALSO" .IP "\(bu" 4 XML::LibXML, the Perl bindings to the libxml library .IP "\(bu" 4 The libxml website at .IP "\(bu" 4 the Net::EPP::Client module, for communicating with \s-1EPP\s0 servers. .IP "\(bu" 4 the Net::EPP::Frame::ObjectSpec module, for managing \s-1EP\s0 object metadata. .IP "\(bu" 4 RFCs 4930 and \s-1RFC 4934,\s0 available from . .IP "\(bu" 4 The CentralNic \s-1EPP\s0 site at .