ASP4::HTTPContext - Provides access to the intrinsic objects for an HTTP request.
use ASP4::HTTPContext; my $context = ASP4::HTTPContext->current; # Intrinsics: my $request = $context->request; my $response = $context->response; my $session = $context->session; my $server = $context->server; my $config = $context->config; my $stash = $context->stash; # Advanced: my $cgi = $context->cgi; my $r = $context->r;
The HTTPContext itself is the root of all request-processing in an ASP4 web application.
There is only one ASP4::HTTPContext instance throughout the lifetime of a request.
Returns the ASP4::HTTPContext object in use for the current HTTP request.
ASP4::HTTPContext
Returns the ASP4::Request for the HTTP request.
Returns the ASP4::Response for the HTTP request.
Returns the ASP4::Server for the HTTP request.
Returns the ASP4::SessionStateManager for the HTTP request.
Returns the current stash hash in use for the HTTP request.
Returns the current ASP4::Config for the HTTP request.
ASP4::Config
Provided Just In Case - returns the CGI object for the HTTP request.
Provided Just In Case - returns the Apache2::RequestRec for the HTTP request.
NOTE: Under ASP4::API (eg: in a unit test) $r will be an instance of ASP4::Mock::RequestRec instead.
$r
It's possible that some bugs have found their way into this release.
Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=ASP4 to submit bug reports.
Please visit the ASP4 homepage at http://0x31337.org/code/ to see examples of ASP4 in action.
To install ASP4, copy and paste the appropriate command in to your terminal.
cpanm
cpanm ASP4
CPAN shell
perl -MCPAN -e shell install ASP4
For more information on module installation, please visit the detailed CPAN module installation guide.