--- /home/perrin/TT.pm 2004-11-24 11:49:02.901162518 -0500 +++ /home/perrin/TT.pm.new 2004-11-24 12:12:50.466458764 -0500 @@ -3,9 +3,14 @@ use Maypole::Constants; use Template; +our ($template, $provider); + sub template { my ( $self, $r ) = @_; - my $template = Template->new( { INCLUDE_PATH => [ $self->paths($r) ] } ); + $provider ||= Template::Provider->new(); + $provider->include_path([ $self->paths($r) ]); + $template ||= Template->new( { LOAD_TEMPLATES => [ $provider ] } ); + my $output; if ( $template->process( $r->template, { $self->vars($r) }, \$output ) ) { $r->{output} = $output;