in reply to Template / Class DBI question
You need to use a temporary variable if you want to do that.
[% SET proper_name = person.name _ ' PHD' %]
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):
[% person.proper_name = person.name _ ' PHD' %]
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.
|
|---|