Re: [Templates] accessing template variables in perl code

2013-11-11 Thread Dave Howorth
Stuart A Johnston wrote: You could wrap your function in a closure over the name of the template at the time you call process: my $template = 'template/name'; $tt-process($template, { get_func = sub { get_params($template) } }); Er, then again couldn't you just retrieve your data before

Re: [Templates] accessing template variables in perl code

2013-11-11 Thread Dave Howorth
Felipe Gasper (cPanel) wrote: On 11/8/13 10:54 AM, Dave Howorth wrote: I expect my brain is fried and I'm doing it all wrong, but I'd appreciate advice about how to access template variables in perl code. I have a perl function that retrieves some data and returns it. I've put the function

Re: [Templates] accessing template variables in perl code

2013-11-11 Thread Dave Howorth
Dave Howorth wrote: Felipe Gasper (cPanel) wrote: On 11/8/13 10:54 AM, Dave Howorth wrote: I expect my brain is fried and I'm doing it all wrong, but I'd appreciate advice about how to access template variables in perl code. I have a perl function that retrieves some data and returns it.