Integrate mainline
[p5sagit/p5-mst-13.2.git] / t / op / eval.t
index 42a71e2..17b8d9d 100755 (executable)
@@ -1,6 +1,6 @@
 #!./perl
 
-print "1..41\n";
+print "1..45\n";
 
 eval 'print "ok 1\n";';
 
@@ -221,3 +221,16 @@ print $@;
     };
     print "not ok 41\n" if $@;
 }
+
+# Make sure that "my $$x" is forbidden
+# 20011224 MJD
+{
+  eval q{my $$x};
+  print $@ ? "ok 42\n" : "not ok 42\n";
+  eval q{my @$x};
+  print $@ ? "ok 43\n" : "not ok 43\n";
+  eval q{my %$x};
+  print $@ ? "ok 44\n" : "not ok 44\n";
+  eval q{my $$$x};
+  print $@ ? "ok 45\n" : "not ok 45\n";
+}