[Templates] Hash delete Vmethod Doesn't Return value(s)
Andy Wardley
abw@wardley.org
Fri, 20 Apr 2007 13:23:04 +0100
Josh Rosenbaum wrote:
> It seems to me that the hash.delete() vmethod should return the value(s)
> it deletes.
Hmm, yes, perhaps it should. Although that does make things slightly less
convenient for the simpler case when you're not interested in the values
returned.
[% CALL hash.delete('foo') %] vs [% hash.delete('foo') %]
I wonder if it would be better to have a separate method, say remove(), which
returns the values, leaving delete() to simply delete them and throw the
results away.
A