in reply to Re: Template::Toolkit: get the names of mentioned variables?
in thread Template::Toolkit: get the names of mentioned variables?

Yeah, that's what I was afraid of. But since my template texts are currently very simple, for now I'm just going to do a regex parsing to extract the variables. Today's the deadline, argh!

Thanks for the pointer, though. I'm just familiarizing with the various classes and I'll look into subclassing Template::Stash later. Seems like the proper thing to do. I'm thinking of processing the template twice, in the first pass my custom stash will remember the variable names.

  • Comment on Re^2: Template::Toolkit: get the names of mentioned variables?

Replies are listed 'Best First'.
Re^3: Template::Toolkit: get the names of mentioned variables?
by dgaramond2 (Monk) on Apr 21, 2005 at 05:42 UTC
    Well, subclassing Template::Stash is not hard at all after all. I just needed to supply a custom get() method. Works like a charm! I've accomplished what I needed to be done in the first place. Perl is great!