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