Sean McAfee wrote:
> $Template::Stash::SCALAR_OPS->{isOneOf} = sub {
>     my $str = shift;
>     $str eq $_ and return 1 for @_;
>     return 0;
> };

Or for added pzazz, something like:

  use Perl6::Junction qw/ any /;

  $Template::Stash::SCALAR_OPS->{isOneOf} = sub {
      my $str = shift;
      return (any(@_) eq $str);
  }

TMTOWTDI :)
Dave

_______________________________________________
templates mailing list
templates@template-toolkit.org
http://mail.template-toolkit.org/mailman/listinfo/templates

Reply via email to