Sponsored Content
The Lounge What is on Your Mind? Human Cyber Consciousness: The Next Frontier in Cybersecurity Post 303015764 by Johndick on Thursday 12th of April 2018 12:18:56 AM
Old 04-12-2018
Your book looks interesting, I'll order one. Smilie
 

2 More Discussions You Might Find Interesting

1. What is on Your Mind?

Virtualized Cyberspace, Cyberspace Consciousness and Simulation Theory - What Do You Think?

What do you think? Read this: Virtualized Cyberspace, Cyberspace Consciousness and Simulation Theory and comment below.... Are we in a computer simulation? Yes or No? Thanks! (0 Replies)
Discussion started by: Neo
0 Replies

2. What is on Your Mind?

(Preprint) Human Cyber Consciousness - The Next Frontier

Preprint available at Amazon (Publication date: May 31, 2018): Preprint Cancelled. See this update. (0 Replies)
Discussion started by: Neo
0 Replies
Frontier::Responder(3pm)				User Contributed Perl Documentation				  Frontier::Responder(3pm)

NAME
Frontier::Responder - Create XML-RPC listeners for normal CGI processes SYNOPSIS
use Frontier::Responder; my $res = Frontier::Responder->new( methods => { add => sub{ $_[0] + $_[1] }, cat => sub{ $_[0] . $_[1] }, }, ); print $res->answer; DESCRIPTION
Use Frontier::Responder whenever you need to create an XML-RPC listener using a standard CGI interface. To be effective, a script using this class will often have to be put a directory from which a web server is authorized to execute CGI programs. An XML-RPC listener using this library will be implementing the API of a particular XML-RPC application. Each remote procedure listed in the API of the user defined application will correspond to a hash key that is defined in the "new" method of a Frontier::Responder object. This is exactly the way Frontier::Daemon works as well. In order to process the request and get the response, the "answer" method is needed. Its return value is XML ready for printing. For those new to XML-RPC, here is a brief description of this protocol. XML-RPC is a way to execute functions on a different machine. Both the client's request and listeners response are wrapped up in XML and sent over HTTP. Because the XML-RPC conversation is in XML, the implementation languages of the server (here called a listener), and the client can be different. This can be a powerful and simple way to have very different platforms work together without acrimony. Implicit in the use of XML-RPC is a contract or API that an XML-RPC listener implements and an XML-RPC client calls. The API needs to list not only the various procedures that can be called, but also the XML-RPC datatypes expected for input and output. Remember that although Perl is permissive about datatyping, other languages are not. Unforuntately, the XML-RPC spec doesn't say how to document the API. It is recomended that the author of a Perl XML-RPC listener should at least use POD to explain the API. This allows for the programmatic generation of a clean web page. METHODS
new( OPTIONS ) This is the class constructor. As is traditional, it returns a blessed reference to a Frontier::Responder object. It expects arguments to be given like a hash (Perl's named parameter mechanism). To be effective, populate the "methods" parameter with a hashref that has API procedure names as keys and subroutine references as values. See the SYNOPSIS for a sample usage. answer() In order to parse the request and execute the procedure, this method must be called. It returns a XML string that contains the procedure's response. In a typical CGI program, this string will simply be printed to STDOUT. SEE ALSO
perl(1), Frontier::RPC2(3) <http://www.scripting.com/frontier5/xml/code/rpc.html> AUTHOR
Ken MacLeod <ken@bitsko.slc.ut.us> wrote the underlying RPC library. Joe Johnston <jjohn@cs.umb.edu> wrote an adaptation of the Frontier::Daemon class to create this CGI XML-RPC listener class. perl v5.10.1 2002-08-03 Frontier::Responder(3pm)
All times are GMT -4. The time now is 04:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy