[Catalyst] TT2 + CP::Authentication + DBIC gotcha
jgottshall at capwiz.com
Fri Jul 13 17:39:43 GMT 2007
stephen joseph butler wrote:
> If you want something one line, how about this:
> my $vote = $foo ? $bar : undef;
Which might be rendered in TT as:
[% vote = foo ? bar : '' %]
Since we don't have an explicit undef in TT (yet), I tend to use an
empty string; it seems to carry almost all the same implications and
works for most cases.
Note that using the ?: operator also eliminates the need for the
explicit SET directive, the lack of which was the source of the OP's
problem. And it's less typing, too!
More information about the Catalyst