=head1 METHODS
-=over 4
+=over 4
=item subreq [path as string or hash ref], [stash as hash ref], [parameters as hash ref]
If the path is passed as a hash ref then it can include body, action, match and path.
Any additional parameters are put into the stash.
-=back
+=back
=cut
my $inner_ctx = $class->prepare;
$inner_ctx->stash($stash || {});
-
-
+
+
$c->stats->profile(
begin => 'subrequest: /' . $path,
comment => '',
- ) if ($c->debug);
-
+ ) if ($c->debug);
+
$inner_ctx->dispatch;
$c->stats->profile( end => 'subrequest: /' . $path ) if ($c->debug);
-
+
return $inner_ctx->response->body;
}
sub prepare {
my ($self, $c) = @_;
my $req = $c->request;
-
+
@{$req}{keys %{$self->{orig_request}}} = values %{$self->{orig_request}};
while (my ($key,$value) = each %{$self->{request_mods}}) {
if (my $mut = $req->can($key)) {