diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-07-04 09:13:17 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-09-15 22:44:55 -0700 |
commit | 4210d3f17cf9d854c0cbf0e1afb06e737174f8ea (patch) | |
tree | efc39119656264c3e86de28179261818b5c201e9 /perly.h | |
parent | 60ac52eb5d5157fbe18e603a2d72ef6249b62083 (diff) | |
download | perl-4210d3f17cf9d854c0cbf0e1afb06e737174f8ea.tar.gz |
Make ‘sub foo{}’ respect ‘our foo’
This commit switches all sub definitions, whether with ‘our’ or not,
to using S_force_ident_maybe_lex (formerly known as S_pending_ident).
This means that an unqualified (no our/my/state or package prefix)
‘sub foo’ declaration does a pad lookup, just like $foo.
It turns out that the vivification that I added to the then
S_pending_ident for CVs was unnecessary and actually buggy. We
*don’t* want to autovivify GVs for CVs, because they might be con-
stants or forward declarations, which are stored in a simpler form.
I also had to change the subname rule used by MYSUB in perly.y, since
it can now be fed a PRIVATEREF, which it does not expect. This may
prove to be temporary, but it keeps current tests passing.
Diffstat (limited to 'perly.h')
-rw-r--r-- | perly.h | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -268,6 +268,6 @@ typedef union YYSTYPE /* Generated from: - * 3e01d5213d0f6a4dd26b90cfb22baf8eaf3c89d8ae0025fdc9e06ec1f871e826 perly.y + * d37e00fcfb1737df464a95af8f4a92c2518ee5b69cd05ffc577f253313aa81c3 perly.y * 4a3ced51fe6585f6ec59e65e1ffd74bc976c498b0e6992eaab337219fee72e51 regen_perly.pl * ex: set ro: */ |