Trying to use this:

use Template;
use Template::Context;
use Template::View;

my $context = Template::Context->new(
    {
        STAT_TTL => 1,
    }
);

my $view = Template::View->new( $context, { prefix => '', } );

my $template = Template->new(
    {
        CONTEXT => $context,
        VARIABLES => { default => $view, }
    }
) or die;

say $template->process('test');

but no avail.. is this just impossible?  Thanks
On Wed, Apr 1, 2009 at 10:25 AM, Timmy Chan <[email protected]> wrote:

> Is there a way to do views in the perl code so that it doesn't need to be
> created every time?  Perhaps something like:
>
> my $view = Template::View->new( %params );
>
> Template->new( VIEWS => { $view } )
>
>
>
_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to