RPC::XML::Parser(3)
β¨ NAME β¨
okay so this is the manual page for RPC::XML::Parser(3) β the interface for parsers created by RPC::XML::ParserFactory. thatβs the whole name-section vibe, bestie π
π¦ SYNOPSIS π¦
This class is not instantiated directly; see RPC::XML::ParserFactory. periodt.
π DESCRIPTION π
The RPC::XML::Parser class encapsulates the interface for the parsing process. It is an empty class that is used in conjunction with the RPC::XML::ParserFactory class.
All parser implementations that are intended to be returned by calls to RPC::XML::ParserFactory::new() should declare this as their parent class. yes, itβs giving βabstract parent energyβ π«Ά
πΈ SUBROUTINES/METHODS πΈ
This class provides empty implementations for the following methods. A parser implementation must provide definitions for both of these methods. If the versions from this class are triggered they will throw exceptions (die). like, actually die π
The descriptions below define the interface that implementations must adhere to.
new([ARGS])β Create a new instance of the class. Any extra data passed to the constructor is taken as key/value pairs (not a hash reference) and attached to the object.- The following parameters are currently recognized:
base64_to_fhβ If passed with a true value, this tells the parser that incoming Base64 data is to be spooled to a filehandle opened onto an anonymous temporary file. The file itself is unlinked after opening, though the resultingRPC::XML::base64object can use itsto_filemethod to save the data to a specific file at a later point. No checks on size are made; if this option is set, all Base64 data goes to filehandles.base64_temp_dirβ If this argument is passed, the value is taken as the directory under which the temporary files are created. This is so that the application is not locked in to the list of directories thatFile::Specdefaults to with itstmpdirmethod. If this is not passed, the previously-mentioned method is used to derive the directory in which to create the temporary files. Only relevant ifbase64_to_fhis set.- The
base64*parameters do not have to be implemented if the user has no plans to use theto_filemethod of theRPC::XML::base64data-class. - As a special-case, to preserve backwards compatibility with pre-0.69 versions of this package,
new()has special behavior when specifically called for the packageRPC::XML::Parser. When called for this package, the constructor quietly loadsRPC::XML::ParserFactoryand uses it to construct and return an instance of a parser based onXML::Parser.
parse [ STRING | STREAM ]β Parse the XML document specified in either a string or a stream. The stream may be any file descriptor, derivative ofIO::Handle, etc.- The value returned must be one of the following:
RPC::XML::requestinstance β When passed a valid XML-RPC request message, the return value should be an instance of theRPC::XML::requestclass.RPC::XML::responseinstance β Likewise, when passed a valid XML-RPC response, the return value should be an instance of theRPC::XML::responseclass.- string containing an error message β If the message does not conform to either a request or a response, or does not properly parse, the return value must be a string containing the error message.
- A non-blocking (push) parser instance β If no arguments are passed in, the return value must be a parser object that implements push-parsing (non-blocking). It does not have to be of the same class as the original object, but it must support the remaining two methods.
The next two methods are only called on push-parser instances, and as such do not have to be implemented by the actual factory-compatible parser. It is enough if the non-blocking parser instance it returns from the no-argument call to parse() implements these:
parse_more STRINGβ Send a chunk of the current XML document to the parser for processing.parse_doneβ Signal the end of parsing. The return value from this should be one of the same three possibilities that the direct use ofparse()(above) returns:RPC::XML::requestinstanceRPC::XML::responseinstance- string containing an error message
parse_done()may also signal an error by throwing an exception.
π©Ί DIAGNOSTICS π©Ί
Unless otherwise specified, routines return the object reference itself upon a successful operation, and an error string (which is not a blessed reference) upon error. ngl, βnot a blessed referenceβ is such a specific little warning and we respect it π
π BUGS π
Please report any bugs or feature requests to bug-rpc-xml at rt.cpan.org, or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=RPC-XML>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes. bestie, the pipeline is pipelining π«Ά
π«Ά SUPPORT π«Ά
- RT: CPAN's request tracker β
<http://rt.cpan.org/NoAuth/Bugs.html?Dist=RPC-XML> - AnnoCPAN: Annotated CPAN documentation β
<http://annocpan.org/dist/RPC-XML> - CPAN Ratings β
<http://cpanratings.perl.org/d/RPC-XML> - Search CPAN β
<http://search.cpan.org/dist/RPC-XML> - MetaCPAN β
<https://metacpan.org/release/RPC-XML> - Source code on GitHub β
<http://github.com/rjray/rpc-xml>
π LICENSE AND COPYRIGHT π
This file and the code within are copyright (c) 2011 by Randy J. Ray.
Copying and distribution are permitted under the terms of the Artistic License 2.0 (<http://www.opensource.org/licenses/artistic-license-2.0.php>) or the GNU LGPL 2.1 (<http://www.opensource.org/licenses/lgpl-2.1.php>). legal slay π
π CREDITS π
The XML-RPC standard is Copyright (c) 1998-2001, UserLand Software, Inc. See <http://www.xmlrpc.com> for more information about the XML-RPC specification. iconic lineage, honestly π
π SEE ALSO π
RPC::XMLRPC::XML::ParserFactoryRPC::XML::Parser::XMLParser
π AUTHOR π
Randy J. Ray <rjray@blackperl.com>
okay bestie, thatβs the whole manual page β mwah π and a little sparkly receipt at the very end: this footer vibe comes from perl v5.42.0, dated 2021-04-08 β¨
π¦ where this page comes from
- opensuse-leap 16.0: perl-RPC-XML 0.82-160000.2.2 Β· Artistic-1.0 OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms