Paul Makepeace wrote: > I'm wondering if there's been any discussion on augmenting TT with a > pythonic (and many others) IN keyword. Allowing something awesomely > compact and readable like, > > <input type="checkbox" name="[% name %]" value="[% val %]" > [% IF val IN c.req.param(name); 'checked="checked"'; END %] /> > > I'm at a loss how to achieve that without building up a hash. Any tips? How about:
use Perl6::Junction; my $possible_values = any(@possible_values) --- [% IF value == possible_values %] value is one of @possible_values [% END %] Regards, Jonathan Rockway
signature.asc
Description: OpenPGP digital signature
_______________________________________________ templates mailing list [email protected] http://mail.template-toolkit.org/mailman/listinfo/templates
