#!perl

use strict;
use warnings;
use blib;

my $n = 1_000;
my $p = 100;

my $test = <<'TEST';
 my $e = $x->{foo}[0]{bar};
 delete $x->{a}[1]{b};
 exists $x->{x}[2]{y};
TEST

for (1 .. $n) {
 my $x;
 my $r = eval <<" CODE";
  no autovivification;
  $test
 CODE
 die $@ if $@ or defined $x;
 for (1 .. $p) {
  my $x;
  my $r = eval $test;
  die $@ if $@;
 }
}
