dear all,

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.

if this already been discussed before, feel free to blame me and (kindly) 
point me to the relevant threads.

please criticize if there's anything wrong with this.

regards,
kenneth

Reply via email to