--- /dev/null
+#!perl -T
+
+use strict;
+use warnings;
+
+use Variable::Temp 'temp';
+
+use Test::More;
+
+BEGIN {
+ if ("$]" >= 5.014) {
+ plan tests => 7 + 13;
+ } else {
+ plan skip_all => 'perl 5.14 required to lvalue assignment with prototype \[$@%]';
+ }
+}
+
+my $x = 1;
+is $x, 1;
+{
+ temp $x = 2;
+ is $x, 2;
+ $x = 3;
+ is $x, 3;
+ {
+ temp $x = 4;
+ is $x, 4;
+ temp $x = 5;
+ is $x, 5;
+ }
+ is $x, 3;
+}
+is $x, 1;
+
+our $y = 1;
+is $y, 1;
+{
+ temp $y = 2;
+ is $y, 2;
+ $y = 3;
+ is $y, 3;
+ {
+ temp $y = 4;
+ is $y, 4;
+ temp $y = 5;
+ is $y, 5;
+ }
+ is $y, 3;
+ {
+ local $y = 6;
+ is $y, 6;
+ }
+ is $y, 3;
+ {
+ local $y = 7;
+ temp $y = 8;
+ is $y, 8;
+ }
+ is $y, 3;
+ {
+ temp $y = 9;
+ local $y = 10;
+ is $y, 10;
+ }
+ is $y, 3;
+}
+is $y, 1;