[Catalyst-dev] Reasonable change to C::V::TT?
Ashley
apv at sedition.com
Wed Nov 26 22:06:36 GMT 2008
Along these lines: http://www.fayland.org/blog/2006/11/catalyst-tt-
wrapper-trick.html
This would allow individual responses to use the default WRAPPER,
clear it and use none, or use a one-off.
E.g.: $c->stash( wrapper => undef ); # clears
$c->stash( wrapper => "special/section/wrapper.tt" );
Catalyst::View::TT, line 236-ish
if ( $vars->{wrapper} ) {
$self->template->service->{WRAPPER} = [ $vars->{wrapper} ];
}
elsif ( exists $vars->{wrapper} ) # allow undef to clear wrapper
{
$self->template->service->{WRAPPER} = [];
}
If this strikes everyone as reasonable, I'll do a bit of Pod to go
with it and get a diff ready.
If someone has a better idea for how to handle this (I think multiple
TT views is certainly a decent way to approach it but adding a
package for every desired exception to the site-wide wrapper strikes
me as Wrong™).
-Ashley
More information about the Catalyst-dev
mailing list