On 29 May 2012 22:57, Matthew Whiteside <mdwhit...@gmail.com> wrote:
> Hello,
>
> I am using template toolkit in conjunction with DBIx::Class::ResultSets. I
> would like to callĀ  the ResultSet object method "first", but I am getting
> weird results, I think due to a conflict with the TT virtual method "first".
>
> Is there a way to differentiate between a virtual method and a object method
> in TT?

You shouldn't get TT List virtual methods on objects - either you have a list
and so get list virtual methods like first, or you have a
scalar/reference to an object and first will be provided by that
object,  along with scalar vmethods ( unless they clash).

You may want to take a close look at what context your resultsets are
in in the template, and decide if you need the TT list vmethods or the
resultset iterator objects methods.

A.

-- 
Aaron J Trevena, BSc Hons
http://www.aarontrevena.co.uk
LAMP System Integration, Development and Consulting

_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to