]> git.vpit.fr Git - perl/modules/autovivification.git/blob - t/20-hash.t
Classify aliasing constructs in the "store" category
[perl/modules/autovivification.git] / t / 20-hash.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 use Test::More tests => 6 * 3 * 274;
7
8 use lib 't/lib';
9 use autovivification::TestCases;
10
11 while (<DATA>) {
12  1 while chomp;
13  next unless /#/;
14  testcase_ok($_, '%');
15 }
16
17 __DATA__
18
19 --- fetch ---
20
21 $x # $x->{a} # '', undef, { } 
22 $x # $x->{a} # '', undef, undef #
23 $x # $x->{a} # '', undef, undef # +fetch
24 $x # $x->{a} # '', undef, { }   # +exists
25 $x # $x->{a} # '', undef, { }   # +delete
26 $x # $x->{a} # '', undef, { }   # +store
27
28 $x # $x->{a} # '', undef, { }   # -fetch
29 $x # $x->{a} # '', undef, { }   # +fetch -fetch
30 $x # $x->{a} # '', undef, undef # -fetch +fetch
31 $x # $x->{a} # '', undef, undef # +fetch -exists
32
33 $x # $x->{a} # qr/^Reference vivification forbidden/, undef, undef # +strict +fetch
34 $x # $x->{a} # '', undef, { } # +strict +exists
35 $x # $x->{a} # '', undef, { } # +strict +delete
36 $x # $x->{a} # '', undef, { } # +strict +store
37
38 $x # $x->{a}->{b} # '', undef, { a => { } }
39 $x # $x->{a}->{b} # '', undef, undef        #
40 $x # $x->{a}->{b} # '', undef, undef        # +fetch
41 $x # $x->{a}->{b} # '', undef, { a => { } } # +exists
42 $x # $x->{a}->{b} # '', undef, { a => { } } # +delete
43 $x # $x->{a}->{b} # '', undef, { a => { } } # +store
44
45 $x # $x->{a}->{b} # qr/^Reference vivification forbidden/, undef, undef # +strict +fetch
46 $x # $x->{a}->{b} # '', undef, { a => { } } # +strict +exists
47 $x # $x->{a}->{b} # '', undef, { a => { } } # +strict +delete
48 $x # $x->{a}->{b} # '', undef, { a => { } } # +strict +store
49
50 $x->{a} = 1 # $x->{a} # '', 1,     { a => 1 } # +fetch
51 $x->{a} = 1 # $x->{b} # '', undef, { a => 1 } # +fetch
52 $x->{a} = 1 # $x->{a} # '', 1,     { a => 1 } # +exists
53 $x->{a} = 1 # $x->{b} # '', undef, { a => 1 } # +exists
54 $x->{a} = 1 # $x->{a} # '', 1,     { a => 1 } # +delete
55 $x->{a} = 1 # $x->{b} # '', undef, { a => 1 } # +delete
56 $x->{a} = 1 # $x->{a} # '', 1,     { a => 1 } # +store
57 $x->{a} = 1 # $x->{b} # '', undef, { a => 1 } # +store
58
59 $x->{a} = 1 # $x->{a} # '', 1,     { a => 1 } # +strict +fetch
60 $x->{a} = 1 # $x->{b} # '', undef, { a => 1 } # +strict +fetch
61 $x->{a} = 1 # $x->{a} # '', 1,     { a => 1 } # +strict +exists
62 $x->{a} = 1 # $x->{b} # '', undef, { a => 1 } # +strict +exists
63 $x->{a} = 1 # $x->{a} # '', 1,     { a => 1 } # +strict +delete
64 $x->{a} = 1 # $x->{b} # '', undef, { a => 1 } # +strict +delete
65 $x->{a} = 1 # $x->{a} # '', 1,     { a => 1 } # +strict +store
66 $x->{a} = 1 # $x->{b} # '', undef, { a => 1 } # +strict +store
67
68 $x->{a}->{b} = 1 # $x->{a}->{b} # '', 1,     { a => { b => 1 } } # +fetch
69 $x->{a}->{b} = 1 # $x->{a}->{d} # '', undef, { a => { b => 1 } } # +fetch
70 $x->{a}->{b} = 1 # $x->{c}->{d} # '', undef, { a => { b => 1 } } # +fetch
71 $x->{a}->{b} = 1 # $x->{a}->{b} # '', 1,     { a => { b => 1 } } # +exists
72 $x->{a}->{b} = 1 # $x->{a}->{d} # '', undef, { a => { b => 1 } } # +exists
73 $x->{a}->{b} = 1 # $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } } # +exists
74 $x->{a}->{b} = 1 # $x->{a}->{b} # '', 1,     { a => { b => 1 } } # +delete
75 $x->{a}->{b} = 1 # $x->{a}->{d} # '', undef, { a => { b => 1 } } # +delete
76 $x->{a}->{b} = 1 # $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } } # +delete
77 $x->{a}->{b} = 1 # $x->{a}->{b} # '', 1,     { a => { b => 1 } } # +store
78 $x->{a}->{b} = 1 # $x->{a}->{d} # '', undef, { a => { b => 1 } } # +store
79 $x->{a}->{b} = 1 # $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } } # +store
80
81 $x->{a}->{b} = 1 # $x->{a}->{b} # '', 1,     { a => { b => 1 } }                # +strict +fetch
82 $x->{a}->{b} = 1 # $x->{a}->{d} # '', undef, { a => { b => 1 } }                # +strict +fetch
83 $x->{a}->{b} = 1 # $x->{c}->{d} # qr/^Reference vivification forbidden/, undef, { a => { b => 1 } } # +strict +fetch
84 $x->{a}->{b} = 1 # $x->{a}->{b} # '', 1,     { a => { b => 1 } }                # +strict +exists
85 $x->{a}->{b} = 1 # $x->{a}->{d} # '', undef, { a => { b => 1 } }                # +strict +exists
86 $x->{a}->{b} = 1 # $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } }      # +strict +exists
87 $x->{a}->{b} = 1 # $x->{a}->{b} # '', 1,     { a => { b => 1 } }                # +strict +delete
88 $x->{a}->{b} = 1 # $x->{a}->{d} # '', undef, { a => { b => 1 } }                # +strict +delete
89 $x->{a}->{b} = 1 # $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } }      # +strict +delete
90 $x->{a}->{b} = 1 # $x->{a}->{b} # '', 1,     { a => { b => 1 } }                # +strict +store
91 $x->{a}->{b} = 1 # $x->{a}->{d} # '', undef, { a => { b => 1 } }                # +strict +store
92 $x->{a}->{b} = 1 # $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } }      # +strict +store
93
94 --- aliasing ---
95
96 $x # 1 for $x->{a}; () # '', undef, { a => undef }
97 $x # 1 for $x->{a}; () # '', undef, { a => undef } #
98 $x # 1 for $x->{a}; () # '', undef, { a => undef } # +fetch
99 $x # 1 for $x->{a}; () # '', undef, { a => undef } # +exists
100 $x # 1 for $x->{a}; () # '', undef, { a => undef } # +delete
101 $x # 1 for $x->{a}; () # qr/^Can't vivify reference/, undef, undef # +store
102
103 $x # $_ = 1 for $x->{a}; () # '', undef, { a => 1 }
104 $x # $_ = 1 for $x->{a}; () # '', undef, { a => 1 } #
105 $x # $_ = 1 for $x->{a}; () # '', undef, { a => 1 } # +fetch
106 $x # $_ = 1 for $x->{a}; () # '', undef, { a => 1 } # +exists
107 $x # $_ = 1 for $x->{a}; () # '', undef, { a => 1 } # +delete
108 $x # $_ = 1 for $x->{a}; () # qr/^Can't vivify reference/, undef, undef # +store
109
110 $x->{a} = 1 # 1 for $x->{a}; () # '', undef, { a => 1 }             # +fetch
111 $x->{a} = 1 # 1 for $x->{b}; () # '', undef, { a => 1, b => undef } # +fetch
112 $x->{a} = 1 # 1 for $x->{a}; () # '', undef, { a => 1 }             # +exists
113 $x->{a} = 1 # 1 for $x->{b}; () # '', undef, { a => 1, b => undef } # +exists
114 $x->{a} = 1 # 1 for $x->{a}; () # '', undef, { a => 1 }             # +delete
115 $x->{a} = 1 # 1 for $x->{b}; () # '', undef, { a => 1, b => undef } # +delete
116 $x->{a} = 1 # 1 for $x->{a}; () # '', undef, { a => 1 }             # +store
117 $x->{a} = 1 # 1 for $x->{b}; () # '', undef, { a => 1, b => undef } # +store
118
119 --- dereferencing ---
120
121 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef
122 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef #
123 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef # +fetch
124 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef # +exists
125 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef # +delete
126 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef # +store
127
128 $x->{a} = 1 # my @a = %$x; () # '', undef, { a => 1 } # +fetch
129 $x->{a} = 1 # my @a = %$x; () # '', undef, { a => 1 } # +exists
130 $x->{a} = 1 # my @a = %$x; () # '', undef, { a => 1 } # +delete
131 $x->{a} = 1 # my @a = %$x; () # '', undef, { a => 1 } # +store
132
133 --- exists ---
134
135 $x # exists $x->{a} # '', '', { }
136 $x # exists $x->{a} # '', '', undef #
137 $x # exists $x->{a} # '', '', { }   # +fetch
138 $x # exists $x->{a} # '', '', undef # +exists
139 $x # exists $x->{a} # '', '', { }   # +delete
140 $x # exists $x->{a} # '', '', { }   # +store
141
142 $x # exists $x->{a} # '', '', { } # +strict +fetch
143 $x # exists $x->{a} # qr/^Reference vivification forbidden/, undef, undef # +strict +exists
144 $x # exists $x->{a} # '', '', { } # +strict +delete
145 $x # exists $x->{a} # '', '', { } # +strict +store
146
147 $x # exists $x->{a}->{b} # '', '', { a => { } }
148 $x # exists $x->{a}->{b} # '', '', undef        #
149 $x # exists $x->{a}->{b} # '', '', { a => { } } # +fetch
150 $x # exists $x->{a}->{b} # '', '', undef        # +exists
151 $x # exists $x->{a}->{b} # '', '', { a => { } } # +delete
152 $x # exists $x->{a}->{b} # '', '', { a => { } } # +store
153
154 $x # exists $x->{a}->{b} # '', '', { a => { } } # +strict +fetch
155 $x # exists $x->{a}->{b} # qr/^Reference vivification forbidden/, undef, undef # +strict +exists
156 $x # exists $x->{a}->{b} # '', '', { a => { } } # +strict +delete
157 $x # exists $x->{a}->{b} # '', '', { a => { } } # +strict +store
158
159 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +fetch
160 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +fetch
161 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +exists
162 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +exists
163 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +delete
164 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +delete
165 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +store
166 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +store
167
168 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +strict +fetch
169 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +strict +fetch
170 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +strict +exists
171 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +strict +exists
172 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +strict +delete
173 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +strict +delete
174 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +strict +store
175 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +strict +store
176
177 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } } # +fetch
178 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } } # +fetch
179 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } } # +fetch
180 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } } # +exists
181 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } } # +exists
182 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 } } # +exists
183 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } } # +delete
184 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } } # +delete
185 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } } # +delete
186 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } } # +store
187 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } } # +store
188 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } } # +store
189
190 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } }            # +strict +fetch
191 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } }            # +strict +fetch
192 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } }  # +strict +fetch
193 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } }            # +strict +exists
194 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } }            # +strict +exists
195 $x->{a}->{b} = 1 # exists $x->{c}->{d} # qr/^Reference vivification forbidden/, undef, { a => { b => 1 } }  # +strict +exists
196 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } }            # +strict +delete
197 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } }            # +strict +delete
198 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } }  # +strict +delete
199 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } }            # +strict +store
200 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } }            # +strict +store
201 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } }  # +strict +store
202
203 --- delete ---
204
205 $x # delete $x->{a} # '', undef, { }
206 $x # delete $x->{a} # '', undef, undef #
207 $x # delete $x->{a} # '', undef, { }   # +fetch
208 $x # delete $x->{a} # '', undef, { }   # +exists
209 $x # delete $x->{a} # '', undef, undef # +delete
210 $x # delete $x->{a} # '', undef, { }   # +store
211
212 $x # delete $x->{a} # '', undef, { } # +strict +fetch
213 $x # delete $x->{a} # '', undef, { } # +strict +exists
214 $x # delete $x->{a} # qr/^Reference vivification forbidden/, undef, undef # +strict +delete
215 $x # delete $x->{a} # '', undef, { } # +strict +store
216
217 $x # delete $x->{a}->{b} # '', undef, { a => { } }
218 $x # delete $x->{a}->{b} # '', undef, undef        #
219 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +fetch
220 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +exists
221 $x # delete $x->{a}->{b} # '', undef, undef        # +delete
222 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +store
223
224 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +strict +fetch
225 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +strict +exists
226 $x # delete $x->{a}->{b} # qr/^Reference vivification forbidden/, undef, undef # +strict +delete
227 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +strict +store
228
229 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +fetch
230 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +fetch
231 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +exists
232 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +exists
233 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +delete
234 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +delete
235 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +store
236 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +store
237
238 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +strict +fetch
239 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +strict +fetch
240 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +strict +exists
241 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +strict +exists
242 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +strict +delete
243 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +strict +delete
244 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +strict +store
245 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +strict +store
246
247 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }       # +fetch
248 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }# +fetch
249 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } } # +fetch
250 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }       # +exists
251 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }# +exists
252 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } } # +exists
253 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }       # +delete
254 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }# +delete
255 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 } }# +delete
256 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }       # +store
257 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }# +store
258 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } } # +store
259
260 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }                # +strict +fetch
261 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }         # +strict +fetch
262 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => {} }# +strict +fetch
263 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }                # +strict +exists
264 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }         # +strict +exists
265 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => {} }# +strict +exists
266 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }                # +strict +delete
267 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }         # +strict +delete
268 $x->{a}->{b} = 1 # delete $x->{c}->{d} # qr/^Reference vivification forbidden/, undef, { a => { b => 1 } }  # +strict +delete
269 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }                # +strict +store
270 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }         # +strict +store
271 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => {} }# +strict +store
272
273 --- store ---
274
275 $x # $x->{a} = 1 # '', 1, { a => 1 }
276 $x # $x->{a} = 1 # '', 1, { a => 1 } #
277 $x # $x->{a} = 1 # '', 1, { a => 1 } # +fetch
278 $x # $x->{a} = 1 # '', 1, { a => 1 } # +exists
279 $x # $x->{a} = 1 # '', 1, { a => 1 } # +delete
280 $x # $x->{a} = 1 # qr/^Can't vivify reference/, undef, undef # +store
281
282 $x # $x->{a} = 1 # '', 1, { a => 1 } # +strict +fetch
283 $x # $x->{a} = 1 # '', 1, { a => 1 } # +strict +exists
284 $x # $x->{a} = 1 # '', 1, { a => 1 } # +strict +delete
285 $x # $x->{a} = 1 # qr/^Reference vivification forbidden/, undef, undef # +strict +store
286
287 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } }
288 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } #
289 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +fetch
290 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +exists
291 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +delete
292 $x # $x->{a}->{b} = 1 # qr/^Can't vivify reference/, undef, undef # +store
293
294 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +strict +fetch
295 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +strict +exists
296 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +strict +delete
297 $x # $x->{a}->{b} = 1 # qr/^Reference vivification forbidden/, undef, undef # +strict +store
298
299 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +fetch
300 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +fetch
301 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +exists
302 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +exists
303 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +delete
304 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +delete
305 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +store
306 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +store
307
308 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +strict +fetch
309 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +strict +fetch
310 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +strict +exists
311 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +strict +exists
312 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +strict +delete
313 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +strict +delete
314 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +strict +store
315 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +strict +store
316
317 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +fetch
318 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +fetch
319 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +fetch
320 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +exists
321 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +exists
322 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +exists
323 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +delete
324 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +delete
325 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +delete
326 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +store
327 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +store
328 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # qr/^Can't vivify reference/, undef, { a => { b => 1 } } # +store
329
330 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +strict +fetch
331 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +strict +fetch
332 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +strict +fetch
333 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +strict +exists
334 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +strict +exists
335 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +strict +exists
336 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +strict +delete
337 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +strict +delete
338 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +strict +delete
339 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +strict +store
340 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +strict +store
341 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # qr/^Reference vivification forbidden/, undef, { a => { b => 1 } } # +strict +store