darren chamberlain wrote:
> As an aside, might it make sense to have a hash virtual method reverse,
> which does, effectively, %hash = reverse %hash? Patch attached.
I'm very wary about adding any hash virtual methods because they clash
so easily with potential hash keys.
If we add 'reverse', for example, then we break any code that's doing this:
[% IF hash.reverse %]
# 'reverse' hash key is set
[% ELSE %]
# 'reverse' hash key is not set
[% END %]
This is an important issue that would be really nice to solve in some
way. Adding hash virtual methods, either to the core or on a day-to-day,
project-to-project basis, shouldn't be so precarious but is. Maybe we
need a new syntax or feature to help disambiguate these cases. But I'm
not sure what that might be right now...
Fundamentally it comes down to the fact that more magic can sometimes
be too much magic. Do What I Mean isn't always Do The Right Thing :-(
A
_______________________________________________
templates mailing list
[EMAIL PROTECTED]
http://lists.ourshack.com/mailman/listinfo/templates