talexb has asked for the wisdom of the Perl Monks concerning the following question:
I'm in a situation where I'd like to be able to use a Template::Toolkit file (the template, with variables where the data will go) and a populated file and go backwards to get a hash of variables that contain the corresponding values.
That is, if I have a template
and a config filedirectory: [%- foobar -%]
then eventually I'll havedirectory: /home/alpha/beta
$variables{'foobar'} = '/home/alpha/beta';
Hmmm .. I do have conditionals in my file, so this may be a tough nut to crack .. let me tinker a bit. But if you have ideas, feel free!
Alex / talexb / Toronto
"Groklaw is the open-source mentality applied to legal research" ~ Linus Torvalds
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: Inverting Template::Toolkit
by Corion (Patriarch) on Jul 25, 2005 at 20:41 UTC | |
by talexb (Chancellor) on Jul 25, 2005 at 21:26 UTC | |
Re: Inverting Template::Toolkit
by davorg (Chancellor) on Jul 26, 2005 at 08:06 UTC | |
by Jaap (Curate) on Jul 26, 2005 at 10:03 UTC |
Back to
Seekers of Perl Wisdom