Hi,
I am trying to access a DateTime::Duration method from within my TT template and getting an getting the following exception:
snip ... <td>[% citer.life_left.years %]</td> snip ...
where citer.life_left is a DateTime::Duration object.
DateTime::Duration does not overload comparison. See the documentation on the compare() method for details. at template.html line 28
eval {...} called at template.html line7
Template::Document::__ANON__('Template::Context=HASH(0x5f3ccc)') called at /usr/lib/perl5/site_perl/5.8.4/Template/Document.pm line 155
...
DateTime::Duration obviously does not overload comparison operators, but where am I comparing anything ? Calling the years() method in the Perl code outside the template works fine.
Another problem is that the line numbers are incorrect (8 lines off). Line 28 in my template is a line of static HTML. I had to comment out everything to figure out the offending line. What's causing this?
Is the above TT syntax doing something behind the scenes?
Thanks in advance for any pointers.
Arshavir
_______________________________________________ templates mailing list [EMAIL PROTECTED] http://lists.template-toolkit.org/mailman/listinfo/templates
