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! --Jason _______________________________________________ List: [email protected] Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/[email protected]/ Dev site: http://dev.catalyst.perl.org/
