+ check { $h{x} = 9 } { store => 1 }, 'store on tied hash';
+
+ $x = check { exists $h{x} } { exists => 1 }, 'exists on tied hash';
+ ok $x, 'uvar: exists on tied hash succeeded';
+
+ $x = check { delete $h{x} } { delete => 1 }, 'delete on tied hash';
+ is $x, 9, 'uvar: delete on tied hash succeeded';
+}
+
+$wiz2 = wizard fetch => sub { 0 };
+my %h2 = (a => 37, b => 2, c => 3);
+cast %h2, $wiz2;
+
+$x = eval {
+ local $SIG{__WARN__} = sub { die };
+ $h2{a};
+};
+is $@, '', 'uvar: fetch with incomplete magic doesn\'t croak';
+is $x, 37, 'uvar: fetch with incomplete magic correctly';
+
+eval {
+ local $SIG{__WARN__} = sub { die };
+ $h2{a} = 73;
+};
+is $@, '', 'uvar: store with incomplete magic doesn\'t croak';
+is $h2{a}, 73, 'uvar: store with incomplete magic correctly';
+
+my $wiz3 = wizard store => sub { ++$_[2]; 0 }, copy_key => 1;
+my %h3 = (a => 3);
+cast %h3, $wiz3;
+
+for my $i (1 .. 2) {
+ my $key = 'a';
+ eval { $h3{$key} = 3 + $i };
+ is $@, '', "uvar: change key in store doesn't croak ($i)";
+ is $key, 'a', "uvar: change key didn't clobber \$key ($i)";
+ is_deeply \%h3, { a => 3, b => 3 + $i },
+ "uvar: change key in store correcty ($i)";
+}
+
+for my $i (1 .. 2) {
+ eval { $h3{b} = 5 + $i };
+ is $@, '', "uvar: change readonly key in store doesn't croak ($i)";
+ is_deeply \%h3, { a => 3, b => 5, c => 5 + $i },
+ "uvar: change readonly key in store correcty ($i)";
+}