POE::Filter::XML::RPC::Fault - A XMLRPC Fault abstraction
use 5.010; use POE::Filter::XML::RPC::Fault; my $fault = POE::Filter::XML::RPC::Fault->new(503, 'Fail text here'); say $fault->code(); # 503 say $fault->string(); # Fail text here
POE::Filter::XML::RPC::Fault provides a convient object for representing faults within XMLRPC without having to construct them manually.
new() accepts two arguments, one, the integer code value for the fault, and two, a string explaining the fault. Both arguments are required.
code() returns the integer value for the particular Fault. Takes no arguments.
string() returns the string value for the particular Fault. Takes no arguments.
Fault is actually a subclass of POE::Filter::XML::Node and so all of its methods, including XML::LibXML::Element's, are available for use. This could ultimately be useful to avoid marshalling all of the data out of the Node and instead apply an XPATH expression to target specifically what is desired deep within a nested structure.
Copyright 2009 Nicholas Perez. Licensed and distributed under the GPL.
To install POE::Filter::XML::RPC, copy and paste the appropriate command in to your terminal.
cpanm
cpanm POE::Filter::XML::RPC
CPAN shell
perl -MCPAN -e shell install POE::Filter::XML::RPC
For more information on module installation, please visit the detailed CPAN module installation guide.