6 use Test::More tests => 6 * 3 * 240;
9 my ($var, $init, $code, $exp, $use, $global) = @_;
10 my $decl = $global ? "our $var; local $var;" : "my $var;";
11 my $test = $var =~ /^[@%]/ ? "\\$var" : $var;
17 local \$SIG{__WARN__} = sub { die join '', 'warn:', \@_ };
22 like \$@, \$exp[0], \$desc . ' [exception]';
24 is \$@, \$exp[0], \$desc . ' [exception]';
26 is_deeply \$res, \$exp[1], \$desc . ' [return]';
27 is_deeply $test, \$exp[2], \$desc . ' [variable]';
34 my @chunks = split /#+/, "$_ ";
35 s/^\s+//, s/\s+$// for @chunks;
36 my ($init, $code, $exp, $opts) = @chunks;
37 (my $var = $init) =~ s/[^\$@%\w].*//;
38 $init = $var eq $init ? '' : "$init;";
41 for (split ' ', $opts) {
43 $no = 0 if s/^([-+])// and $1 eq '-';
44 $use .= ($no ? 'no' : 'use') . " autovivification '$_';"
46 } elsif (defined $opts) {
48 $use = 'no autovivification;';
54 [ $var, $init, $code, $exp, $use, 0 ],
55 [ $var, "use strict; $init", $code, $exp, $use, 1 ],
56 [ $var, "no strict; $init", $code, $exp, $use, 1 ],
64 $new[1] =~ s/$var\->/$var/g;
65 $new[2] =~ s/$var\->/$var/g;
69 push @testcases, @extra;
71 my $testcase = testcase(@$_);
72 my ($var, $init, $code) = @$_;
73 my $desc = do { (my $x = "$var | $init") =~ s,;\s+$,,; $x } . " | $code | $opts";
75 diag "== This testcase failed to compile ==\n$testcase\n## Reason: $@" if $@;
83 $x # $x->[0] # '', undef, [ ]
84 $x # $x->[0] # '', undef, undef #
85 $x # $x->[0] # '', undef, undef # +fetch
86 $x # $x->[0] # '', undef, [ ] # +exists
87 $x # $x->[0] # '', undef, [ ] # +delete
88 $x # $x->[0] # '', undef, [ ] # +store
90 $x # $x->[0] # qr/^Reference vivification forbidden/, undef, undef # +strict +fetch
91 $x # $x->[0] # '', undef, [ ] # +strict +exists
92 $x # $x->[0] # '', undef, [ ] # +strict +delete
93 $x # $x->[0] # '', undef, [ ] # +strict +store
95 $x # $x->[0]->[1] # '', undef, [ [ ] ]
96 $x # $x->[0]->[1] # '', undef, undef #
97 $x # $x->[0]->[1] # '', undef, undef # +fetch
98 $x # $x->[0]->[1] # '', undef, [ [ ] ] # +exists
99 $x # $x->[0]->[1] # '', undef, [ [ ] ] # +delete
100 $x # $x->[0]->[1] # '', undef, [ [ ] ] # +store
102 $x # $x->[0]->[1] # qr/^Reference vivification forbidden/, undef, undef # +strict +fetch
103 $x # $x->[0]->[1] # '', undef, [ [ ] ] # +strict +exists
104 $x # $x->[0]->[1] # '', undef, [ [ ] ] # +strict +delete
105 $x # $x->[0]->[1] # '', undef, [ [ ] ] # +strict +store
107 $x->[0] = 1 # $x->[0] # '', 1, [ 1 ] # +fetch
108 $x->[0] = 1 # $x->[1] # '', undef, [ 1 ] # +fetch
109 $x->[0] = 1 # $x->[0] # '', 1, [ 1 ] # +exists
110 $x->[0] = 1 # $x->[1] # '', undef, [ 1 ] # +exists
111 $x->[0] = 1 # $x->[0] # '', 1, [ 1 ] # +delete
112 $x->[0] = 1 # $x->[1] # '', undef, [ 1 ] # +delete
113 $x->[0] = 1 # $x->[0] # '', 1, [ 1 ] # +store
114 $x->[0] = 1 # $x->[1] # '', undef, [ 1 ] # +store
116 $x->[0] = 1 # $x->[0] # '', 1, [ 1 ] # +strict +fetch
117 $x->[0] = 1 # $x->[1] # '', undef, [ 1 ] # +strict +fetch
118 $x->[0] = 1 # $x->[0] # '', 1, [ 1 ] # +strict +exists
119 $x->[0] = 1 # $x->[1] # '', undef, [ 1 ] # +strict +exists
120 $x->[0] = 1 # $x->[0] # '', 1, [ 1 ] # +strict +delete
121 $x->[0] = 1 # $x->[1] # '', undef, [ 1 ] # +strict +delete
122 $x->[0] = 1 # $x->[0] # '', 1, [ 1 ] # +strict +store
123 $x->[0] = 1 # $x->[1] # '', undef, [ 1 ] # +strict +store
125 $x->[0]->[1] = 1 # $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +fetch
126 $x->[0]->[1] = 1 # $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +fetch
127 $x->[0]->[1] = 1 # $x->[2]->[3] # '', undef, [ [ undef, 1 ] ] # +fetch
128 $x->[0]->[1] = 1 # $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +exists
129 $x->[0]->[1] = 1 # $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +exists
130 $x->[0]->[1] = 1 # $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +exists
131 $x->[0]->[1] = 1 # $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +delete
132 $x->[0]->[1] = 1 # $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +delete
133 $x->[0]->[1] = 1 # $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +delete
134 $x->[0]->[1] = 1 # $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +store
135 $x->[0]->[1] = 1 # $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +store
136 $x->[0]->[1] = 1 # $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +store
138 $x->[0]->[1] = 1 # $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +strict +fetch
139 $x->[0]->[1] = 1 # $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +strict +fetch
140 $x->[0]->[1] = 1 # $x->[2]->[3] # qr/^Reference vivification forbidden/, undef, [ [ undef, 1 ] ] # +strict +fetch
141 $x->[0]->[1] = 1 # $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +strict +exists
142 $x->[0]->[1] = 1 # $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +strict +exists
143 $x->[0]->[1] = 1 # $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +strict +exists
144 $x->[0]->[1] = 1 # $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +strict +delete
145 $x->[0]->[1] = 1 # $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +strict +delete
146 $x->[0]->[1] = 1 # $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +strict +delete
147 $x->[0]->[1] = 1 # $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +strict +store
148 $x->[0]->[1] = 1 # $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +strict +store
149 $x->[0]->[1] = 1 # $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +strict +store
153 $x # exists $x->[0] # '', '', [ ]
154 $x # exists $x->[0] # '', '', undef #
155 $x # exists $x->[0] # '', '', [ ] # +fetch
156 $x # exists $x->[0] # '', '', undef # +exists
157 $x # exists $x->[0] # '', '', [ ] # +delete
158 $x # exists $x->[0] # '', '', [ ] # +store
160 $x # exists $x->[0] # '', '', [ ] # +strict +fetch
161 $x # exists $x->[0] # qr/^Reference vivification forbidden/, undef, undef # +strict +exists
162 $x # exists $x->[0] # '', '', [ ] # +strict +delete
163 $x # exists $x->[0] # '', '', [ ] # +strict +store
165 $x # exists $x->[0]->[1] # '', '', [ [ ] ]
166 $x # exists $x->[0]->[1] # '', '', undef #
167 $x # exists $x->[0]->[1] # '', '', [ [ ] ] # +fetch
168 $x # exists $x->[0]->[1] # '', '', undef # +exists
169 $x # exists $x->[0]->[1] # '', '', [ [ ] ] # +delete
170 $x # exists $x->[0]->[1] # '', '', [ [ ] ] # +store
172 $x # exists $x->[0]->[1] # '', '', [ [ ] ] # +strict +fetch
173 $x # exists $x->[0]->[1] # qr/^Reference vivification forbidden/, undef, undef # +strict +exists
174 $x # exists $x->[0]->[1] # '', '', [ [ ] ] # +strict +delete
175 $x # exists $x->[0]->[1] # '', '', [ [ ] ] # +strict +store
177 $x->[0] = 1 # exists $x->[0] # '', 1, [ 1 ] # +fetch
178 $x->[0] = 1 # exists $x->[1] # '', '', [ 1 ] # +fetch
179 $x->[0] = 1 # exists $x->[0] # '', 1, [ 1 ] # +exists
180 $x->[0] = 1 # exists $x->[1] # '', '', [ 1 ] # +exists
181 $x->[0] = 1 # exists $x->[0] # '', 1, [ 1 ] # +delete
182 $x->[0] = 1 # exists $x->[1] # '', '', [ 1 ] # +delete
183 $x->[0] = 1 # exists $x->[0] # '', 1, [ 1 ] # +store
184 $x->[0] = 1 # exists $x->[1] # '', '', [ 1 ] # +store
186 $x->[0] = 1 # exists $x->[0] # '', 1, [ 1 ] # +strict +fetch
187 $x->[0] = 1 # exists $x->[1] # '', '', [ 1 ] # +strict +fetch
188 $x->[0] = 1 # exists $x->[0] # '', 1, [ 1 ] # +strict +exists
189 $x->[0] = 1 # exists $x->[1] # '', '', [ 1 ] # +strict +exists
190 $x->[0] = 1 # exists $x->[0] # '', 1, [ 1 ] # +strict +delete
191 $x->[0] = 1 # exists $x->[1] # '', '', [ 1 ] # +strict +delete
192 $x->[0] = 1 # exists $x->[0] # '', 1, [ 1 ] # +strict +store
193 $x->[0] = 1 # exists $x->[1] # '', '', [ 1 ] # +strict +store
195 $x->[0]->[1] = 1 # exists $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +fetch
196 $x->[0]->[1] = 1 # exists $x->[0]->[3] # '', '', [ [ undef, 1 ] ] # +fetch
197 $x->[0]->[1] = 1 # exists $x->[2]->[3] # '', '', [ [ undef, 1 ], undef, [ ] ] # +fetch
198 $x->[0]->[1] = 1 # exists $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +exists
199 $x->[0]->[1] = 1 # exists $x->[0]->[3] # '', '', [ [ undef, 1 ] ] # +exists
200 $x->[0]->[1] = 1 # exists $x->[2]->[3] # '', '', [ [ undef, 1 ] ] # +exists
201 $x->[0]->[1] = 1 # exists $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +delete
202 $x->[0]->[1] = 1 # exists $x->[0]->[3] # '', '', [ [ undef, 1 ] ] # +delete
203 $x->[0]->[1] = 1 # exists $x->[2]->[3] # '', '', [ [ undef, 1 ], undef, [ ] ] # +delete
204 $x->[0]->[1] = 1 # exists $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +store
205 $x->[0]->[1] = 1 # exists $x->[0]->[3] # '', '', [ [ undef, 1 ] ] # +store
206 $x->[0]->[1] = 1 # exists $x->[2]->[3] # '', '', [ [ undef, 1 ], undef, [ ] ] # +store
208 $x->[0]->[1] = 1 # exists $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +strict +fetch
209 $x->[0]->[1] = 1 # exists $x->[0]->[3] # '', '', [ [ undef, 1 ] ] # +strict +fetch
210 $x->[0]->[1] = 1 # exists $x->[2]->[3] # '', '', [ [ undef, 1 ], undef, [ ] ] # +strict +fetch
211 $x->[0]->[1] = 1 # exists $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +strict +exists
212 $x->[0]->[1] = 1 # exists $x->[0]->[3] # '', '', [ [ undef, 1 ] ] # +strict +exists
213 $x->[0]->[1] = 1 # exists $x->[2]->[3] # qr/^Reference vivification forbidden/, undef, [ [ undef, 1 ] ] # +strict +exists
214 $x->[0]->[1] = 1 # exists $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +strict +delete
215 $x->[0]->[1] = 1 # exists $x->[0]->[3] # '', '', [ [ undef, 1 ] ] # +strict +delete
216 $x->[0]->[1] = 1 # exists $x->[2]->[3] # '', '', [ [ undef, 1 ], undef, [ ] ] # +strict +delete
217 $x->[0]->[1] = 1 # exists $x->[0]->[1] # '', 1, [ [ undef, 1 ] ] # +strict +store
218 $x->[0]->[1] = 1 # exists $x->[0]->[3] # '', '', [ [ undef, 1 ] ] # +strict +store
219 $x->[0]->[1] = 1 # exists $x->[2]->[3] # '', '', [ [ undef, 1 ], undef, [ ] ] # +strict +store
223 $x # delete $x->[0] # '', undef, [ ]
224 $x # delete $x->[0] # '', undef, undef #
225 $x # delete $x->[0] # '', undef, [ ] # +fetch
226 $x # delete $x->[0] # '', undef, [ ] # +exists
227 $x # delete $x->[0] # '', undef, undef # +delete
228 $x # delete $x->[0] # '', undef, [ ] # +store
230 $x # delete $x->[0] # '', undef, [ ] # +strict +fetch
231 $x # delete $x->[0] # '', undef, [ ] # +strict +exists
232 $x # delete $x->[0] # qr/^Reference vivification forbidden/, undef, undef # +strict +delete
233 $x # delete $x->[0] # '', undef, [ ] # +strict +store
235 $x # delete $x->[0]->[1] # '', undef, [ [ ] ]
236 $x # delete $x->[0]->[1] # '', undef, undef #
237 $x # delete $x->[0]->[1] # '', undef, [ [ ] ] # +fetch
238 $x # delete $x->[0]->[1] # '', undef, [ [ ] ] # +exists
239 $x # delete $x->[0]->[1] # '', undef, undef # +delete
240 $x # delete $x->[0]->[1] # '', undef, [ [ ] ] # +store
242 $x # delete $x->[0]->[1] # '', undef, [ [ ] ] # +strict +fetch
243 $x # delete $x->[0]->[1] # '', undef, [ [ ] ] # +strict +exists
244 $x # delete $x->[0]->[1] # qr/^Reference vivification forbidden/, undef, undef # +strict +delete
245 $x # delete $x->[0]->[1] # '', undef, [ [ ] ] # +strict +store
247 $x->[0] = 1 # delete $x->[0] # '', 1, [ ] # +fetch
248 $x->[0] = 1 # delete $x->[1] # '', undef, [ 1 ] # +fetch
249 $x->[0] = 1 # delete $x->[0] # '', 1, [ ] # +exists
250 $x->[0] = 1 # delete $x->[1] # '', undef, [ 1 ] # +exists
251 $x->[0] = 1 # delete $x->[0] # '', 1, [ ] # +delete
252 $x->[0] = 1 # delete $x->[1] # '', undef, [ 1 ] # +delete
253 $x->[0] = 1 # delete $x->[0] # '', 1, [ ] # +store
254 $x->[0] = 1 # delete $x->[1] # '', undef, [ 1 ] # +store
256 $x->[0] = 1 # delete $x->[0] # '', 1, [ ] # +strict +fetch
257 $x->[0] = 1 # delete $x->[1] # '', undef, [ 1 ] # +strict +fetch
258 $x->[0] = 1 # delete $x->[0] # '', 1, [ ] # +strict +exists
259 $x->[0] = 1 # delete $x->[1] # '', undef, [ 1 ] # +strict +exists
260 $x->[0] = 1 # delete $x->[0] # '', 1, [ ] # +strict +delete
261 $x->[0] = 1 # delete $x->[1] # '', undef, [ 1 ] # +strict +delete
262 $x->[0] = 1 # delete $x->[0] # '', 1, [ ] # +strict +store
263 $x->[0] = 1 # delete $x->[1] # '', undef, [ 1 ] # +strict +store
265 $x->[0]->[1] = 1 # delete $x->[0]->[1] # '', 1, [ [ ] ] # +fetch
266 $x->[0]->[1] = 1 # delete $x->[0]->[3] # '', undef, [ [ undef, 1 ] ]# +fetch
267 $x->[0]->[1] = 1 # delete $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +fetch
268 $x->[0]->[1] = 1 # delete $x->[0]->[1] # '', 1, [ [ ] ] # +exists
269 $x->[0]->[1] = 1 # delete $x->[0]->[3] # '', undef, [ [ undef, 1 ] ]# +exists
270 $x->[0]->[1] = 1 # delete $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +exists
271 $x->[0]->[1] = 1 # delete $x->[0]->[1] # '', 1, [ [ ] ] # +delete
272 $x->[0]->[1] = 1 # delete $x->[0]->[3] # '', undef, [ [ undef, 1 ] ]# +delete
273 $x->[0]->[1] = 1 # delete $x->[2]->[3] # '', undef, [ [ undef, 1 ] ]# +delete
274 $x->[0]->[1] = 1 # delete $x->[0]->[1] # '', 1, [ [ ] ] # +store
275 $x->[0]->[1] = 1 # delete $x->[0]->[3] # '', undef, [ [ undef, 1 ] ]# +store
276 $x->[0]->[1] = 1 # delete $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ] # +store
278 $x->[0]->[1] = 1 # delete $x->[0]->[1] # '', 1, [ [ ] ] # +strict +fetch
279 $x->[0]->[1] = 1 # delete $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +strict +fetch
280 $x->[0]->[1] = 1 # delete $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ]# +strict +fetch
281 $x->[0]->[1] = 1 # delete $x->[0]->[1] # '', 1, [ [ ] ] # +strict +exists
282 $x->[0]->[1] = 1 # delete $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +strict +exists
283 $x->[0]->[1] = 1 # delete $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ]# +strict +exists
284 $x->[0]->[1] = 1 # delete $x->[0]->[1] # '', 1, [ [ ] ] # +strict +delete
285 $x->[0]->[1] = 1 # delete $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +strict +delete
286 $x->[0]->[1] = 1 # delete $x->[2]->[3] # qr/^Reference vivification forbidden/, undef, [ [ undef, 1 ] ] # +strict +delete
287 $x->[0]->[1] = 1 # delete $x->[0]->[1] # '', 1, [ [ ] ] # +strict +store
288 $x->[0]->[1] = 1 # delete $x->[0]->[3] # '', undef, [ [ undef, 1 ] ] # +strict +store
289 $x->[0]->[1] = 1 # delete $x->[2]->[3] # '', undef, [ [ undef, 1 ], undef, [ ] ]# +strict +store
293 $x # $x->[0] = 1 # '', 1, [ 1 ]
294 $x # $x->[0] = 1 # '', 1, [ 1 ] #
295 $x # $x->[0] = 1 # '', 1, [ 1 ] # +fetch
296 $x # $x->[0] = 1 # '', 1, [ 1 ] # +exists
297 $x # $x->[0] = 1 # '', 1, [ 1 ] # +delete
298 $x # $x->[0] = 1 # qr/^Can't vivify reference/, undef, undef # +store
300 $x # $x->[0] = 1 # '', 1, [ 1 ] # +strict +fetch
301 $x # $x->[0] = 1 # '', 1, [ 1 ] # +strict +exists
302 $x # $x->[0] = 1 # '', 1, [ 1 ] # +strict +delete
303 $x # $x->[0] = 1 # qr/^Reference vivification forbidden/, undef, undef # +strict +store
305 $x # $x->[0]->[1] = 1 # '', 1, [ [ undef, 1 ] ]
306 $x # $x->[0]->[1] = 1 # '', 1, [ [ undef, 1 ] ] #
307 $x # $x->[0]->[1] = 1 # '', 1, [ [ undef, 1 ] ] # +fetch
308 $x # $x->[0]->[1] = 1 # '', 1, [ [ undef, 1 ] ] # +exists
309 $x # $x->[0]->[1] = 1 # '', 1, [ [ undef, 1 ] ] # +delete
310 $x # $x->[0]->[1] = 1 # qr/^Can't vivify reference/, undef, undef # +store
312 $x # $x->[0]->[1] = 1 # '', 1, [ [ undef, 1 ] ] # +strict +fetch
313 $x # $x->[0]->[1] = 1 # '', 1, [ [ undef, 1 ] ] # +strict +exists
314 $x # $x->[0]->[1] = 1 # '', 1, [ [ undef, 1 ] ] # +strict +delete
315 $x # $x->[0]->[1] = 1 # qr/^Reference vivification forbidden/, undef, undef # +strict +store
317 $x->[0] = 1 # $x->[0] = 2 # '', 2, [ 2 ] # +fetch
318 $x->[0] = 1 # $x->[1] = 2 # '', 2, [ 1, 2 ] # +fetch
319 $x->[0] = 1 # $x->[0] = 2 # '', 2, [ 2 ] # +exists
320 $x->[0] = 1 # $x->[1] = 2 # '', 2, [ 1, 2 ] # +exists
321 $x->[0] = 1 # $x->[0] = 2 # '', 2, [ 2 ] # +delete
322 $x->[0] = 1 # $x->[1] = 2 # '', 2, [ 1, 2 ] # +delete
323 $x->[0] = 1 # $x->[0] = 2 # '', 2, [ 2 ] # +store
324 $x->[0] = 1 # $x->[1] = 2 # '', 2, [ 1, 2 ] # +store
326 $x->[0] = 1 # $x->[0] = 2 # '', 2, [ 2 ] # +strict +fetch
327 $x->[0] = 1 # $x->[1] = 2 # '', 2, [ 1, 2 ] # +strict +fetch
328 $x->[0] = 1 # $x->[0] = 2 # '', 2, [ 2 ] # +strict +exists
329 $x->[0] = 1 # $x->[1] = 2 # '', 2, [ 1, 2 ] # +strict +exists
330 $x->[0] = 1 # $x->[0] = 2 # '', 2, [ 2 ] # +strict +delete
331 $x->[0] = 1 # $x->[1] = 2 # '', 2, [ 1, 2 ] # +strict +delete
332 $x->[0] = 1 # $x->[0] = 2 # '', 2, [ 2 ] # +strict +store
333 $x->[0] = 1 # $x->[1] = 2 # '', 2, [ 1, 2 ] # +strict +store
335 $x->[0]->[1] = 1 # $x->[0]->[1] = 2 # '', 2, [ [ undef, 2 ] ] # +fetch
336 $x->[0]->[1] = 1 # $x->[0]->[3] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +fetch
337 $x->[0]->[1] = 1 # $x->[2]->[3] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +fetch
338 $x->[0]->[1] = 1 # $x->[0]->[1] = 2 # '', 2, [ [ undef, 2 ] ] # +exists
339 $x->[0]->[1] = 1 # $x->[0]->[3] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +exists
340 $x->[0]->[1] = 1 # $x->[2]->[3] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +exists
341 $x->[0]->[1] = 1 # $x->[0]->[1] = 2 # '', 2, [ [ undef, 2 ] ] # +delete
342 $x->[0]->[1] = 1 # $x->[0]->[3] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +delete
343 $x->[0]->[1] = 1 # $x->[2]->[3] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +delete
344 $x->[0]->[1] = 1 # $x->[0]->[1] = 2 # '', 2, [ [ undef, 2 ] ] # +store
345 $x->[0]->[1] = 1 # $x->[0]->[3] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +store
346 $x->[0]->[1] = 1 # $x->[2]->[3] = 2 # qr/^Can't vivify reference/, undef, [ [ undef, 1 ] ] # +store
348 $x->[0]->[1] = 1 # $x->[0]->[1] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +fetch
349 $x->[0]->[1] = 1 # $x->[0]->[3] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +fetch
350 $x->[0]->[1] = 1 # $x->[2]->[3] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +strict +fetch
351 $x->[0]->[1] = 1 # $x->[0]->[1] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +exists
352 $x->[0]->[1] = 1 # $x->[0]->[3] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +exists
353 $x->[0]->[1] = 1 # $x->[2]->[3] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +strict +exists
354 $x->[0]->[1] = 1 # $x->[0]->[1] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +delete
355 $x->[0]->[1] = 1 # $x->[0]->[3] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +delete
356 $x->[0]->[1] = 1 # $x->[2]->[3] = 2 # '', 2, [ [ undef, 1 ], undef, [ undef, undef, undef, 2 ] ] # +strict +delete
357 $x->[0]->[1] = 1 # $x->[0]->[1] = 2 # '', 2, [ [ undef, 2 ] ] # +strict +store
358 $x->[0]->[1] = 1 # $x->[0]->[3] = 2 # '', 2, [ [ undef, 1, undef, 2 ] ] # +strict +store
359 $x->[0]->[1] = 1 # $x->[2]->[3] = 2 # qr/^Reference vivification forbidden/, undef, [ [ undef, 1 ] ] # +strict +store