=head1 NAME

Apache::SubRequest - Perl API for Apache subrequests




=head1 Synopsis

  use Apache::SubRequest ();

META: to be completed




=head1 Description

META: to be completed




=head1 API

C<Apache::SubRequest> provides the following functions and/or methods:




=head2 C<DESTROY>

META: Autogenerated - needs to be reviewed/completed

Free the memory associated with a sub request

  $r->DESTROY();

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The sub request to finish

=item ret: no return value

=back





=head2 C<internal_fast_redirect>

META: Autogenerated - needs to be reviewed/completed

Redirect the current request to a sub_req, merging the pools

  $r->internal_fast_redirect($sub_req);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$sub_req> (string)

A subrequest created from this request

=item ret: no return value

=back





=head2 C<internal_redirect>

META: Autogenerated - needs to be reviewed/completed

Then there's the case that you want some other request to be served as
the top-level request INSTEAD of what the client requested directly.
If so, call this from a handler, and then immediately return OK.

Redirect the current request to some other uri

  $r->internal_redirect($new_uri);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$new_uri> (string)

The URI to replace the current request with

=item ret: no return value

=back





=head2 C<internal_redirect_handler>

META: Autogenerated - needs to be reviewed/completed

This function is designed for things like actions or CGI scripts, when
using AddHandler, and you want to preserve the content type across an
internal redirect.

  $r->internal_redirect_handler($new_uri);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$new_uri> (string)

The URI to replace the current request with.

=item ret: no return value

=back





=head2 C<lookup_dirent>

META: Autogenerated - needs to be reviewed/completed

Create a sub request for the given apr_dir_read result.  This sub request
can be inspected to find information about the requested file

  $lr = $r->lookup_dirent($finfo, $subtype, $next_filter);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$finfo> (C<L<APR::Finfo|docs::2.0::api::APR::Finfo>>)

The apr_dir_read result to lookup

=item arg3: C<$subtype> (integer)

What type of subrequest to perform, one of;

  Apache::SUBREQ_NO_ARGS     ignore r->args and r->path_info
  Apache::SUBREQ_MERGE_ARGS  merge  r->args and r->path_info

=item arg4: C<$next_filter> (integer)

The first filter the sub_request should use.  If this is
NULL, it defaults to the first filter for the main request

=item ret: C<$lr> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The new request record

=back





=head2 C<lookup_file>

META: Autogenerated - needs to be reviewed/completed

Create a sub request for the given file.  This sub request can be
inspected to find information about the requested file

  $ret = $r->lookup_file($new_file, $next_filter);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$new_file> (string)

The URI to lookup

=item arg3: C<$next_filter> (C<L<Apache::Filter|docs::2.0::api::Apache::Filter>>)

The first filter the sub_request should use.  If this is NULL, it
defaults to the first filter for the main request

=item ret: C<$ret> (C<L<Apache::SubRequest|docs::2.0::api::Apache::SubRequest>>)

The new request record

=back





=head2 C<lookup_uri>

META: Autogenerated - needs to be reviewed/completed

Create a sub request from the given URI.  This sub request can be
inspected to find information about the requested URI.

  $ret = $r->lookup_uri($new_file, $next_filter);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$new_file> (string)

The URI to lookup

=item arg3: C<$next_filter> (C<L<Apache::Filter|docs::2.0::api::Apache::Filter>>)

The first filter the sub_request should use.  If this is NULL, it
defaults to the first filter for the main request

=item ret: C<$ret> (C<L<Apache::SubRequest|docs::2.0::api::Apache::SubRequest>>)

The new request record

=back





=head2 C<lookup_method_uri>

META: Autogenerated - needs to be reviewed/completed

Create a sub request for the given URI using a specific method.  This
sub request can be inspected to find information about the requested
URI

  $ret = $r->lookup_method_uri($method, $new_file, $next_filter);

=over 4

=item arg1: C<$r> (C<L<Apache::RequestRec|docs::2.0::api::Apache::RequestRec>>)

The current request

=item arg2: C<$method> (string)

The method to use in the new sub request

=item arg3: C<$new_file> (string)

The URI to lookup

=item arg4: C<$next_filter> (C<L<Apache::Filter|docs::2.0::api::Apache::Filter>>)

The first filter the sub_request should use.  If this is NULL, it
defaults to the first filter for the main request

=item ret: C<$ret> (C<L<Apache::SubRequest|docs::2.0::api::Apache::SubRequest>>)

The new request record

=back




=head1 See Also

L<mod_perl 2.0 documentation|docs::2.0::index>.




=head1 Copyright

mod_perl 2.0 and its core modules are copyrighted under
The Apache Software License, Version 1.1.




=head1 Authors

L<The mod_perl development team and numerous
contributors|about::contributors::people>.

=cut

