summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-01-23 10:04:03 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-01-23 10:04:03 +0000
commit1ec3e8dea0b8d5fa438ad59d371998f774ea2f4d (patch)
tree078622e462d6ffe99d3d74becace83d02c75341f /toke.c
parent497714249e2a0fc7fe0b96726f037048f352080d (diff)
downloadperl-1ec3e8dea0b8d5fa438ad59d371998f774ea2f4d.tar.gz
disallow our($foo::bar)
p4raw-id: //depot/perl@4857
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/toke.c b/toke.c
index e2e10f2404..6f9f70cd11 100644
--- a/toke.c
+++ b/toke.c
@@ -1976,6 +1976,10 @@ Perl_yylex(pTHX)
*/
if (PL_in_my) {
if (PL_in_my == KEY_our) { /* "our" is merely analogous to "my" */
+ if (strchr(PL_tokenbuf,':'))
+ yyerror(Perl_form(aTHX_ "No package name allowed for "
+ "variable %s in \"our\"",
+ PL_tokenbuf));
tmp = pad_allocmy(PL_tokenbuf);
}
else {