Hi,

in my TT, I pass a DateTime object(from DBIx::Class and  
DBIx::Class::InflateColumn::DateTime). I can do obj.year and all other DateTime 
operations in my template. But the object gets stringified in my custom filter. 
I am basically calling [% user.last_visited_date | time_ago %]

and time_ago filter is something like

sub timeago { 
   sub { my $datetime_obj = shift; #do more work }
}

here I am expecting a DateTime obj in the custom filter but instead it is 
stringify..

thanks,

James.


      

_______________________________________________
templates mailing list
[email protected]
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to