+
+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 croaks ($i)";
+ is_deeply \%h3, { a => 3, b => 5, c => 5 + $i },
+ "uvar: change readonly key in store correcty ($i)";
+}