]> git.vpit.fr Git - perl/modules/autovivification.git/blob - t/20-hash.t
Remove trailing whitespace
[perl/modules/autovivification.git] / t / 20-hash.t
1 #!perl -T
2
3 use strict;
4 use warnings;
5
6 use lib 't/lib';
7 use Test::Leaner tests => 9 * 3 * 302;
8
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 $x # do_nothing($x->{a}); () # '', undef, { }
120 $x # do_nothing($x->{a}); () # '', undef, { } #
121 $x # do_nothing($x->{a}); () # '', undef, { } # +fetch
122 $x # do_nothing($x->{a}); () # '', undef, { } # +exists
123 $x # do_nothing($x->{a}); () # '', undef, { } # +delete
124 $x # do_nothing($x->{a}); () # qr/^Can't vivify reference/, undef, undef # +store
125
126 $x # set_arg($x->{a}); () # '', undef, { a => 1 }
127 $x # set_arg($x->{a}); () # '', undef, { a => 1 } #
128 $x # set_arg($x->{a}); () # '', undef, { a => 1 } # +fetch
129 $x # set_arg($x->{a}); () # '', undef, { a => 1 } # +exists
130 $x # set_arg($x->{a}); () # '', undef, { a => 1 } # +delete
131 $x # set_arg($x->{a}); () # qr/^Can't vivify reference/, undef, undef # +store
132
133 --- dereferencing ---
134
135 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef
136 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef #
137 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef # +fetch
138 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef # +exists
139 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef # +delete
140 $x # no warnings 'uninitialized'; my @a = %$x; () # ($strict ? qr/^Can't use an undefined value as a HASH reference/ : ''), undef, undef # +store
141
142 $x->{a} = 1 # my @a = %$x; () # '', undef, { a => 1 } # +fetch
143 $x->{a} = 1 # my @a = %$x; () # '', undef, { a => 1 } # +exists
144 $x->{a} = 1 # my @a = %$x; () # '', undef, { a => 1 } # +delete
145 $x->{a} = 1 # my @a = %$x; () # '', undef, { a => 1 } # +store
146
147 --- slice ---
148
149 $x # my @a = @$x{'a', 'b'}; \@a # '', [ undef, undef ], { }
150 $x # my @a = @$x{'a', 'b'}; \@a # '', [ undef, undef ], undef #
151 $x # my @a = @$x{'a', 'b'}; \@a # '', [ undef, undef ], undef # +fetch
152 $x # my @a = @$x{'a', 'b'}; \@a # '', [ undef, undef ], { }   # +exists
153 $x # my @a = @$x{'a', 'b'}; \@a # '', [ undef, undef ], { }   # +delete
154 $x # my @a = @$x{'a', 'b'}; \@a # '', [ undef, undef ], { }   # +store
155
156 $x->{b} = 0 # my @a = @$x{'a', 'b'}; \@a # '', [ undef, 0 ], { b => 0 } # +fetch
157
158 $x # @$x{'a', 'b'} = (1, 2); () # '', undef, { a => 1, b => 2 }
159 $x # @$x{'a', 'b'} = (1, 2); () # '', undef, { a => 1, b => 2 } #
160 $x # @$x{'a', 'b'} = (1, 2); () # '', undef, { a => 1, b => 2 } # +fetch
161 $x # @$x{'a', 'b'} = (1, 2); () # '', undef, { a => 1, b => 2 } # +exists
162 $x # @$x{'a', 'b'} = (1, 2); () # '', undef, { a => 1, b => 2 } # +delete
163 $x # @$x{'a', 'b'} = (1, 2); () # qr/^Can't vivify reference/, undef, undef # +store
164
165 $x->{a} = 0              # @$x{'a', 'b'} = (1, 2); () # '', undef, { a => 1, b => 2 } # +store
166 $x->{c} = 0              # @$x{'a', 'b'} = (1, 2); () # '', undef, { a => 1, b => 2, c => 0 } # +store
167 $x->{a} = 0, $x->{b} = 0 # @$x{'a', 'b'} = (1, 2); () # '', undef, { a => 1, b => 2 } # +store
168
169 --- exists ---
170
171 $x # exists $x->{a} # '', '', { }
172 $x # exists $x->{a} # '', '', undef #
173 $x # exists $x->{a} # '', '', { }   # +fetch
174 $x # exists $x->{a} # '', '', undef # +exists
175 $x # exists $x->{a} # '', '', { }   # +delete
176 $x # exists $x->{a} # '', '', { }   # +store
177
178 $x # exists $x->{a} # '', '', { } # +strict +fetch
179 $x # exists $x->{a} # qr/^Reference vivification forbidden/, undef, undef # +strict +exists
180 $x # exists $x->{a} # '', '', { } # +strict +delete
181 $x # exists $x->{a} # '', '', { } # +strict +store
182
183 $x # exists $x->{a}->{b} # '', '', { a => { } }
184 $x # exists $x->{a}->{b} # '', '', undef        #
185 $x # exists $x->{a}->{b} # '', '', { a => { } } # +fetch
186 $x # exists $x->{a}->{b} # '', '', undef        # +exists
187 $x # exists $x->{a}->{b} # '', '', { a => { } } # +delete
188 $x # exists $x->{a}->{b} # '', '', { a => { } } # +store
189
190 $x # exists $x->{a}->{b} # '', '', { a => { } } # +strict +fetch
191 $x # exists $x->{a}->{b} # qr/^Reference vivification forbidden/, undef, undef # +strict +exists
192 $x # exists $x->{a}->{b} # '', '', { a => { } } # +strict +delete
193 $x # exists $x->{a}->{b} # '', '', { a => { } } # +strict +store
194
195 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +fetch
196 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +fetch
197 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +exists
198 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +exists
199 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +delete
200 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +delete
201 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +store
202 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +store
203
204 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +strict +fetch
205 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +strict +fetch
206 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +strict +exists
207 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +strict +exists
208 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +strict +delete
209 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +strict +delete
210 $x->{a} = 1 # exists $x->{a} # '', 1,  { a => 1 } # +strict +store
211 $x->{a} = 1 # exists $x->{b} # '', '', { a => 1 } # +strict +store
212
213 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } } # +fetch
214 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } } # +fetch
215 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } } # +fetch
216 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } } # +exists
217 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } } # +exists
218 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 } } # +exists
219 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } } # +delete
220 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } } # +delete
221 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } } # +delete
222 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } } # +store
223 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } } # +store
224 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } } # +store
225
226 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } }            # +strict +fetch
227 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } }            # +strict +fetch
228 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } }  # +strict +fetch
229 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } }            # +strict +exists
230 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } }            # +strict +exists
231 $x->{a}->{b} = 1 # exists $x->{c}->{d} # qr/^Reference vivification forbidden/, undef, { a => { b => 1 } }  # +strict +exists
232 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } }            # +strict +delete
233 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } }            # +strict +delete
234 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } }  # +strict +delete
235 $x->{a}->{b} = 1 # exists $x->{a}->{b} # '', 1,  { a => { b => 1 } }            # +strict +store
236 $x->{a}->{b} = 1 # exists $x->{a}->{d} # '', '', { a => { b => 1 } }            # +strict +store
237 $x->{a}->{b} = 1 # exists $x->{c}->{d} # '', '', { a => { b => 1 }, c => { } }  # +strict +store
238
239 --- delete ---
240
241 $x # delete $x->{a} # '', undef, { }
242 $x # delete $x->{a} # '', undef, undef #
243 $x # delete $x->{a} # '', undef, { }   # +fetch
244 $x # delete $x->{a} # '', undef, { }   # +exists
245 $x # delete $x->{a} # '', undef, undef # +delete
246 $x # delete $x->{a} # '', undef, { }   # +store
247
248 $x # delete $x->{a} # '', undef, { } # +strict +fetch
249 $x # delete $x->{a} # '', undef, { } # +strict +exists
250 $x # delete $x->{a} # qr/^Reference vivification forbidden/, undef, undef # +strict +delete
251 $x # delete $x->{a} # '', undef, { } # +strict +store
252
253 $x # delete $x->{a}->{b} # '', undef, { a => { } }
254 $x # delete $x->{a}->{b} # '', undef, undef        #
255 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +fetch
256 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +exists
257 $x # delete $x->{a}->{b} # '', undef, undef        # +delete
258 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +store
259
260 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +strict +fetch
261 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +strict +exists
262 $x # delete $x->{a}->{b} # qr/^Reference vivification forbidden/, undef, undef # +strict +delete
263 $x # delete $x->{a}->{b} # '', undef, { a => { } } # +strict +store
264
265 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +fetch
266 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +fetch
267 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +exists
268 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +exists
269 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +delete
270 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +delete
271 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +store
272 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +store
273
274 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +strict +fetch
275 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +strict +fetch
276 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +strict +exists
277 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +strict +exists
278 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +strict +delete
279 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +strict +delete
280 $x->{a} = 1 # delete $x->{a} # '', 1,     { }        # +strict +store
281 $x->{a} = 1 # delete $x->{b} # '', undef, { a => 1 } # +strict +store
282
283 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }       # +fetch
284 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }# +fetch
285 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } } # +fetch
286 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }       # +exists
287 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }# +exists
288 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } } # +exists
289 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }       # +delete
290 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }# +delete
291 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 } }# +delete
292 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }       # +store
293 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }# +store
294 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => { } } # +store
295
296 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }                # +strict +fetch
297 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }         # +strict +fetch
298 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => {} }# +strict +fetch
299 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }                # +strict +exists
300 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }         # +strict +exists
301 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => {} }# +strict +exists
302 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }                # +strict +delete
303 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }         # +strict +delete
304 $x->{a}->{b} = 1 # delete $x->{c}->{d} # qr/^Reference vivification forbidden/, undef, { a => { b => 1 } }  # +strict +delete
305 $x->{a}->{b} = 1 # delete $x->{a}->{b} # '', 1,     { a => { } }                # +strict +store
306 $x->{a}->{b} = 1 # delete $x->{a}->{d} # '', undef, { a => { b => 1 } }         # +strict +store
307 $x->{a}->{b} = 1 # delete $x->{c}->{d} # '', undef, { a => { b => 1 }, c => {} }# +strict +store
308
309 --- store ---
310
311 $x # $x->{a} = 1 # '', 1, { a => 1 }
312 $x # $x->{a} = 1 # '', 1, { a => 1 } #
313 $x # $x->{a} = 1 # '', 1, { a => 1 } # +fetch
314 $x # $x->{a} = 1 # '', 1, { a => 1 } # +exists
315 $x # $x->{a} = 1 # '', 1, { a => 1 } # +delete
316 $x # $x->{a} = 1 # qr/^Can't vivify reference/, undef, undef # +store
317
318 $x # $x->{a} = 1 # '', 1, { a => 1 } # +strict +fetch
319 $x # $x->{a} = 1 # '', 1, { a => 1 } # +strict +exists
320 $x # $x->{a} = 1 # '', 1, { a => 1 } # +strict +delete
321 $x # $x->{a} = 1 # qr/^Reference vivification forbidden/, undef, undef # +strict +store
322
323 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } }
324 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } #
325 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +fetch
326 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +exists
327 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +delete
328 $x # $x->{a}->{b} = 1 # qr/^Can't vivify reference/, undef, undef # +store
329
330 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +strict +fetch
331 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +strict +exists
332 $x # $x->{a}->{b} = 1 # '', 1, { a => { b => 1 } } # +strict +delete
333 $x # $x->{a}->{b} = 1 # qr/^Reference vivification forbidden/, undef, undef # +strict +store
334
335 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +fetch
336 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +fetch
337 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +exists
338 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +exists
339 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +delete
340 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +delete
341 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +store
342 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +store
343
344 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +strict +fetch
345 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +strict +fetch
346 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +strict +exists
347 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +strict +exists
348 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +strict +delete
349 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +strict +delete
350 $x->{a} = 1 # $x->{a} = 2 # '', 2, { a => 2 }         # +strict +store
351 $x->{a} = 1 # $x->{b} = 2 # '', 2, { a => 1, b => 2 } # +strict +store
352
353 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +fetch
354 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +fetch
355 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +fetch
356 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +exists
357 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +exists
358 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +exists
359 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +delete
360 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +delete
361 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +delete
362 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +store
363 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +store
364 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # qr/^Can't vivify reference/, undef, { a => { b => 1 } } # +store
365
366 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +strict +fetch
367 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +strict +fetch
368 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +strict +fetch
369 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +strict +exists
370 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +strict +exists
371 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +strict +exists
372 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +strict +delete
373 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +strict +delete
374 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # '', 2, { a => { b => 1 }, c => { d => 2 } } # +strict +delete
375 $x->{a}->{b} = 1 # $x->{a}->{b} = 2 # '', 2, { a => { b => 2 } }                # +strict +store
376 $x->{a}->{b} = 1 # $x->{a}->{d} = 2 # '', 2, { a => { b => 1, d => 2 } }        # +strict +store
377 $x->{a}->{b} = 1 # $x->{c}->{d} = 2 # qr/^Reference vivification forbidden/, undef, { a => { b => 1 } } # +strict +store