diff options
-rw-r--r-- | pod/perldiag.pod | 6 | ||||
-rw-r--r-- | toke.c | 4 |
2 files changed, 10 insertions, 0 deletions
diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 2ce165b223..98ae3ad1d1 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1983,6 +1983,12 @@ where you wanted to redirect stdout. and found a 'E<gt>' or a 'E<gt>E<gt>' on the command line, but can't find the name of the file to which to write data destined for stdout. +=item No package name allowed for variable %s in "our" + +(F) Fully qualified variable names are not allowed in "our" declarations, +because that doesn't make much sense under existing semantics. Such +syntax is reserved for future extensions. + =item No Perl script found in input (F) You called C<perl -x>, but no line was found in the file beginning @@ -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 { |