Dave Howorth wrote:
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
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;
Hi all
There may be a better way of doing this that I don't know about, but
assuming there isn't:
Context:
- I'm running a number of white labelled sites, in each of which,
there may be 400 sub-brands
- Each white label site has it's own template which sets the the
Slaven Rezic wrote:
Dave Howorth wrote:
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 /;