NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.
All the Perl that's Practical to Extract and Report
Stories, comments, journals, and other submissions on use Perl; are Copyright 1998-2006, their respective owners.
You can go this far, but no further... (Score:2)
So, how much is too much? Well, this much: a templating system may embed values of variables, apply filters to them (for example HTML escaping), provide simple conditionals, include other templates. And that's about it.
A templating system should not provide ways to connect to a database or to invoke SQL. Your controlling program should already have taken care of that.
The way I would allow directly fetching data from a database from within a template is by using a tie like mechanism: you treat it like a variable, and the fact that under the hood it fetches the value from a database is not really relevant.
Ain't it nice you can do all that just using plain Perl.
Reply to This
Re: (Score:1)
That would have fixed PHP, back in the day.
Re: (Score:2)