http://www.perlmonks.org?node_id=749883


in reply to Getting all used parameters from a Template::Toolkit template

I think you could do this by subclassing the Template::Stash and overriding the new and get, then making a Template::Plugin module to provide the listing function. Looking at the Template::Stash code, it doesn't appear it would be a hugely painful experience, just a bit of a sting.

  • Comment on Re: Getting all used parameters from a Template::Toolkit template -- try #2

Replies are listed 'Best First'.
Re^2: Getting all used parameters from a Template::Toolkit template -- try #2
by Herkum (Parson) on Mar 11, 2009 at 14:33 UTC

    I was going to recommend something similar. Your real problem is that you need code that keeps track of which variables to access. I don't know if subclassing will be able to get you there though, it depends on how TT was written. If the code is structured poorly subclassing will get you no where.