* Brad Bowman <bsb at bereft.net> [2004/03/24 15:20]: > How do you delete a key from a hash in a template? > > Am I missing obvious something here?
There is no delete vmethod, though it would be trivial to create one:
sub delete_vmeth {
my ($hash, $key) = @_;
delete $hash->{$key};
}
And then later, when you have a reference to the Template::Context
instace:
$context->define_vmethod(HASH => delete => \&delete_vmeth);
(darren)
--
All journalists have a novel in them, which is where it belongs.
pgp00000.pgp
Description: PGP signature
