NAME

Apache2::ASP::ApacheRequest - HTTP request abstraction for Apache2::ASP

SYNOPSIS

# For internal use only.
# See tests for usage examples.

DESCRIPTION

To offer some level of abstraction between Apache2::ASP and its host environment, this class was created to proxy method calls (or short-circuit them).

METHODS

new( %args )

Returns a new object.

%args should include the following:

r

An Apache2::RequestRec object. In its place you could use any blessed reference.

uri

Something like /index.asp. The relative URI of the ASP script requested.

status

Something valid like 200 OK or 302 Found

filename

The absolute path to the file specified in uri.

Something like /usr/local/mysite/htdocs/index.asp.

rflush( )

Returns 1 and does nothing else.

print( $str )

Adds $str to the internal string buffer.

buffer( )

Returns the contents of the internal string buffer (as a string).

lookup_uri( $uri )

Returns the absolute path to the script currently being executed.

Mimics the following functionality:

$r->lookup_uri->filename();

headers_out( [\%headers] )

Returns the existing headers_out hash, or replaces it with one provided.

connection( )

Mimics the following functionality:

$r->connection->client_socket->close();

A NOTE ON METHOD PROXYING

All other methods are proxied first to the passed-in Apache2::RequestRec object, then (supposing it can't answer to the method call) to a CGI object.

BUGS

It's possible that some bugs have found their way into this release.

Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Apache2-ASP to submit bug reports.

HOMEPAGE

Please visit the Apache2::ASP homepage at http://apache2-asp.no-ip.org/ to see examples of Apache2::ASP in action.

AUTHOR

John Drago mailto:jdrago_999@yahoo.com

COPYRIGHT AND LICENSE

Copyright 2007 John Drago, All rights reserved.

This software is free software. It may be used and distributed under the same terms as Perl itself.