summaryrefslogtreecommitdiff
path: root/t/op/eval.t
diff options
context:
space:
mode:
authorMark-Jason Dominus <mjd@plover.com>2001-12-24 13:14:48 -0500
committerJarkko Hietaniemi <jhi@iki.fi>2001-12-24 23:47:53 +0000
commitb6512f489e761186d508cf0b8b7705805cfefc52 (patch)
treeae8853499fff0ef5c11e82b7bf9dd55fc85955f5 /t/op/eval.t
parentecf68df6e17568faac489c8f52d98e01e32472af (diff)
downloadperl-b6512f489e761186d508cf0b8b7705805cfefc52.tar.gz
PATCH: Restore "Can't declare scalar dereference in my" error
Message-ID: <20011224231448.25826.qmail@plover.com> p4raw-id: //depot/perl@13881
Diffstat (limited to 't/op/eval.t')
-rwxr-xr-xt/op/eval.t15
1 files changed, 14 insertions, 1 deletions
diff --git a/t/op/eval.t b/t/op/eval.t
index 42a71e2593..17b8d9d689 100755
--- a/t/op/eval.t
+++ b/t/op/eval.t
@@ -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";
+}