.\" Automatically generated by Pod::Man 2.25 (Pod::Simple 3.16) .\" .\" 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" '' '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 turned on, 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. .ie \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . nr % 0 . rr F .\} .el \{\ . de IX .. .\} .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Net::EPP::Frame 3pm" .TH Net::EPP::Frame 3pm "2012-04-23" "perl v5.14.2" "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\s0 4930) 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\s0 3339). 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\fIgetElementsByTagName()\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\fIgetElementsByTagNameNS()\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\fIheader()\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) 2012 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\s0 4934, available from . .IP "\(bu" 4 The CentralNic \s-1EPP\s0 site at .