> Jeffrey Friedl laid this on us: > I have long wished that I could mark a hash such that no new keys could > be added to it -- sort of like a "use strict" for hashes in that if you > intended > $foo->{Quiet} = 1; > and by accident typed > $foo->{Quite} = 1; > you'd get an error. You have my vote. As I noted some time ago, I all too often write use strict; sub setsomething { my ($self, $value); # = @_ omitted by accident $self->{something} = $value; } and $self autovivifies so there's no warning. If I can somehow force $self to be ``clamped'', I could get the warning I wanted. -- jplThread Previous | Thread Next