On Thu, 1 Sep 2005, Trond Michelsen wrote:
> So I was wondering what's the best way of making these
> variables available for the templates that'll use them.
How about writing out a TT template from the perl programme instead of
using Data::Dumper. Then you can just PROCESS it in the normal way.
Instead of:
$VAR1 = {
foo => 'bar',
}
You generate a file that looks like:
[% foo => 'bar' %]
You can even use TT to generate it (untested):
[% TAGS 'asp' %]
[%
<% FOREACH key IN hash.keys %>
<% key %> => '<% hash.$key %>',
<% END %>
%]
You might need to do something to escape the has values if they contain
apostrophes.
Simon.
--
"Drink up, the world's about to end." "This must be Thursday, I could
never get the hang of Thursdays."
_______________________________________________
templates mailing list
[email protected]
http://lists.template-toolkit.org/mailman/listinfo/templates