![]() |
|
P is for Practical | |
PerlMonks |
Re: Parse template into data structureby Hofmator (Curate) |
on Nov 07, 2006 at 09:33 UTC ( #582594=note: print w/replies, xml ) | Need Help?? |
I don't know much about Template::Toolkit and its innards, so I can't tell you if there is a (un)documented way to get at the information you want.
But a simple template basically comes down to some text ... [% variable_name %]... some more text. If this is the case with your templates you can easily parse them directly with something like the following:
-- Hofmator Code written by Hofmator and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.
In Section
Seekers of Perl Wisdom
|
|