HTTP::Engine::Role::Interface - The Interface Role Definition
package HTTP::Engine::Interface::CGI; use Any::Moose; with 'HTTP::Engine::Role::Interface';
HTTP::Engine::Role::Interface defines the role of an interface in HTTP::Engine.
Specifically, an Interface in HTTP::Engine needs to do at least two things:
If you are on a CGI environment, you need to receive all the data from %ENV and such. If you are running on a mod_perl process, you need to muck with $r.
In any case, you need to construct a valid HTTP::Engine::Request object so the application handler can do the real work.
The application handler must return an HTTP::Engine::Response object.
In turn, the interface needs to do whatever necessary to present this object to the client. In a CGI environment, you would write to STDOUT. In mod_perl, you need to call the appropriate $r->headers methods and/or $r->print
Kazuhiro Osawa and HTTP::Engine Authors
HTTP::Engine
To install HTTP::Engine, copy and paste the appropriate command in to your terminal.
cpanm
cpanm HTTP::Engine
CPAN shell
perl -MCPAN -e shell install HTTP::Engine
For more information on module installation, please visit the detailed CPAN module installation guide.