--- trunk/lib/Frey/HTML.pm 2008/06/30 20:02:08 38 +++ trunk/lib/Frey/HTML.pm 2008/06/30 20:02:10 39 @@ -38,6 +38,7 @@ use Template::Declare; use Template::Declare::Tags; # defaults to 'HTML' + Template::Declare->init( roots => \@view_classes, around_template => sub { my ($orig, $path, $args, $code) = @_; my $from = (caller(1))[3]; @@ -83,6 +84,8 @@ sub page { my ( $self, $page, $req, $args ) = @_; + warn "## buffer_stack ",dump( Template::Declare->buffer_stack ); + Template::Declare->buffer->clear; # XXX we need to manually do this! warn "## page $page ",dump($args),"\n"; my $out = eval { Template::Declare->show( $page, $req, $args ) }; if ( $@ ) { @@ -107,3 +110,5 @@ warn "Added javascript $js\n"; push @javascript, $js; } + +1;