> today this just came up to my mind, we could have a pragma that
> disable `autovivification' of hash and array keys. Consider the
> follow code snippet:
>
> @arr = ( 0..9 );
> %hash = ( a=>1, b=>2 );
>
> {
> no autovivify;
> $arr{10}++; # both are
> $hash{c}--; # fatal
> }
>
> this way we can eliminate the need to tie any variables to special classes
> and catch invalid accesses.
But only lexically. The need is to do it on a per-hash basis,
*regardless* of scope.
This would be covered by the 'private' modifier, in my
soon-to-be-appearing RFCs on Perl OO.
Damian