[Catalyst] Catalyst::Plugin::SubRequest

Will Hawes info at whawes.co.uk
Thu Nov 24 17:08:18 CET 2005


I'm confused about the SubRequest plugin. In the synopsis, it says you 
call it like this:

$c->subreq('/foo');

But that currently just gives me a blank screen. The only way I've been 
able to get it working is

$c->res->output( $c->subreq('/foo') );

My end action is as follows:

sub end : Private {
     my ( $self, $c ) = @_;
     if($c->req->params->{debug}) {
         no strict 'refs';
         *{"$self\::debug"} = sub { 1 };
         die 'Debug forced!';
     }
     $c->forward( __PACKAGE__ . '::V::TT' )
	unless ( $c->res->output || !$c->stash->{template} );
}

Is this a problem with my end action or just the way SubRequest is 
supposed to be used?




More information about the Catalyst mailing list