Re: [Templates] in array function?

2008-03-06 Thread Slaven Rezic
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

Re: [Templates] in array function?

2008-03-06 Thread Dave Howorth
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;

[Templates] Feature request : BEGIN or CONSTANT blocks

2008-03-06 Thread Clinton Gormley
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

Re: [Templates] in array function?

2008-03-06 Thread Mark Mills
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 /;