Think about Loose Coupling | |
PerlMonks |
Re: Template / Class DBI questionby cees (Curate) |
on Aug 11, 2005 at 19:40 UTC ( [id://483097]=note: print w/replies, xml ) | Need Help?? |
You need to use a temporary variable if you want to do that.
Or if you really wanted to, you could probably define a TEMP column in your Class::DBI table, which would allow you to do something like this (untested):
Either way, I think this type of code really doesn't belong in the template though. Unless you have no other option, you should keep this out of the template to leave your templates as simple as possible.
If you use the TEMP column trick in Class::DBI then just predefine the proper name in your code somewhere, and then just use [% person.proper_name %] directly in your template.
In Section
Seekers of Perl Wisdom
|
|