Sign in to PrePAN

API Manager Scaffolding for user-defined API's.



require "./";
$result = API::help( {"CLASS" => "Template"} );
print "$result\n\n\n\n";

$result = API::help( {"CLASS" => "Template", "METHOD" => "test", "OFORMAT" => "HTML"} );
print "$result\n\n\n\n";

$result = API::do( {"CLASS" => "Echo", "METHOD" => "test", "OFORMAT" => "PERL", "data" => "This is a test"} );
print "$result\n\n\n\n";

Or, from the command line:

./ CLASS=Template METHOD=test OFORMAT=html data="This is a test"


I'm working on a module that will allow a developer to write "Classes" in Perl. Then, the developer will be able to call methods in those classes from either the command line, cgi, web sockets, stand-alone web servicer, or from native Perl. The classes will be self documenting and will benefit from parameter type-checking. My module will allow the developer to specify both the input and output data format, such as text, csv, html, json, xml, Perl hash, etc. Finally, configuration/authentication information can be segregated from the main code and perhaps even stored outside of the normal web-space.

So, you would be able to create an Object Class Module and be able to call those methods from the command line during testing. Then you could deploy the same code via cgi for your web applications. At scale, this same code would be available via a stand-alone server.

During testing, you could supply the data via xml and get the results in json, if you wanted.


Please sign up to post a review.