I use [% META %] blocks to define some template metadata.  Then in a
wrapper I'm using [% template.foo %] to get at that data.

I'm processing some input files that don't have the [% META %] set,
but I know the values to set when I call $template->process().

Is there a way to get the template meta data set when calling process?

Or do I need to pass in a separate "mytemplate" hash?

my $vars = {
    mytemplate => {
        foo => $bar,
    },
};
$template->process( $page, $vars ) || die;

and then in my templates do:

   [% foo = mytemplate.foo || template.foo %]


-- 
Bill Moseley
[EMAIL PROTECTED]


_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates

Reply via email to