Revision history for Perl extension Catalyst::Plugin::SubRequest
+0.11 2006-04-21 14:13:00
+ - $c->req->params restored after sub_request
0.10 2005-12-08 13:15:00
- Updated test suite to work with new catalyst.
0.09 2005-10-28 01:07:00
use strict;
-our $VERSION = '0.09';
+our $VERSION = '0.11';
=head1 NAME
local $c->req->{arguments} = $c->req->{arguments};
local $c->req->{action};
local $c->req->{path};
- local $c->req->{params};
+ local $c->req->{parameters};
$c->req->path($path);
$c->req->params($params || {});
package main;
-use Test::More tests => 6;
+use Test::More tests => 9;
use lib 't/lib';
use Catalyst::Test 'TestApp';
use File::stat;
is( $response->content, '11433', 'Normal request content', );
}
+{
+ ok( my $response = request('/subtest_params?value=abc'), 'Params Sub Request' );
+ is( $response->code, 200, 'OK status code' );
+ is( $response->content, '1abc3', 'Normal request content' );
+}
\ No newline at end of file
$c->res->body($c->res->body().$arg);
}
+ sub subtest_params : Global {
+ my ( $self, $c ) = @_;
+ my $before = $c->req->params->{value};
+ my $subreq = $c->subreq('/normal/2');
+ my $after = $c->req->params->{value};
+ $c->res->body($c->res->body().$after);
+ }
+
sub end : Private {
my ( $self, $c ) = @_;
$c->res->body($c->res->body().'3');