Drogo::Server::PSGI - Implement a Drogo PSGI application.
Create a new server instance.
Parameters: respond => response object,
Example app.psgi file.
my $app = sub { my $env = shift; return sub { my $respond = shift; # create new server object my $server = Drogo::Server::PSGI->new( env => $env, respond => $respond ); # set default application package $server->variable( app_package => 'dev' ); # do something with server... Example::App->handler( server => $server ); } };
Initializes Drogo instance.
Returns input stream.
Processes a post.
Cleanup processing.
Returns a persistant server variable.
Key without value returns variable.
These include variables set by the server configuration, as "user variables" in nginx.
Returns the uri.
Returns string of arguments.
Returns the request body (used for posts)
Returns the request method (GET or POST)
Returns remote address.
Used by nginx for request body processing.
This function is only called when the request method is a post, in an effort to reduce processing time.
Returns a request header.
Sets a header out.
Send the http header.
Set output status... (200, 404, etc...) If no argument given, returns status.
Print stuff to the http stream.
Sleeps (used by nginx), not needed for other server implementations.
Returns true of only the header was requested.
Unescape an encoded uri.
This function defines what is returned to the server at the end of a dispatch. For nginx, this will be a status code, but in this test implementation we're returning the actual server object itself, so we can evaluate it while testing
Bizowie <http://bizowie.com>
Copyright (C) 2013 Bizowie
This library is free software. You can redistribute it and/or modify it under the same terms as Perl itself.
To install Drogo, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Drogo
CPAN shell
perl -MCPAN -e shell install Drogo
For more information on module installation, please visit the detailed CPAN module installation guide.