Cdbi and Template Toolkit

It is possible to call Class::DBI directly from a Template Toolkit plugin:

[%    USE contact  = Class('app::cdbi::contact'); list_contact = contact.retrieve_all; %]

In most cases you'll probably use search_where instead of retrieve_all:

[%    USE contact  = Class('app::cdbi::contact'); list_contact = contact.search_where(...); %]

You would probably be happier using an iterator rather than a list as this example shows.

TO-DO - show the code using iterator