I am using Perl with Dancer
and Template::Toolkit
.
I'm trying to create a generic routine that will be passed a template and the HTTP GET/POST parameters.
I need to find a way to get a list of the variables in the template, so I can retrieve them from the parameters, or return an error if one or more are missing.
I can go an ugly regex route, but I was hoping for a better/cleaner way.
All the templates are XML/SOAP with a few variables here and there.
Any ideas?