[Dbix-class] Using DBIx::Class with HTML::Template - anyone doing it?

Mike Friedman friedo at friedo.com
Tue Oct 31 17:17:09 GMT 2006


On 10/31/06, Ash Berlin <ash at cpan.org> wrote:

> Not sure if thats a transposition error,
>
> but dont you want:
>
> if ( \@stories ) {
>     $tmpl->param( stories =3D> \@stories );
>     print $tmpl->output;
> }
>
>
Actually he probably wants if ( @stories ) { ... }

A reference to an empty array will still be true. (Because you're testing
the reference for truth, not the array.)


Mike
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://jules.scsys.co.uk/pipermail/dbix-class/attachments/20061031/cd0=
5982e/attachment.htm


More information about the DBIx-Class mailing list