in reply to add and delete to hash reference

Hi. Your add is working fine, but you're trying to report on a subhash of what you just added, which doesn't exist. If you change your testing statement to this you'll see your 'test' key:
print "$closurehash->{$key}\n";

I think your mistake is to assume that ->{name} is some Perlish magic to tell you the name of something. It isn't - it's a reference to a key called 'name' in a subhash of your $closurehash->{$key}, which doesn't exist because you haven't created it.