diff options
author | Stephen McCamant <smcc@mit.edu> | 2001-01-10 13:36:51 -0800 |
---|---|---|
committer | Jarkko Hietaniemi <jhi@iki.fi> | 2001-01-12 16:09:09 +0000 |
commit | 78f9721bf0dc33981bedf125bcfa5c0c42b69eba (patch) | |
tree | 02808081953b524eb6a13bcb5ddba0e2a6e4666f /toke.c | |
parent | b78ba3cc234763c7deff02f1d759b76b3a9ce5d1 (diff) | |
download | perl-78f9721bf0dc33981bedf125bcfa5c0c42b69eba.tar.gz |
Consolidated lvalue sub changes
Message-ID: <14941.16925.736415.785818@soda.csua.berkeley.edu>
p4raw-id: //depot/perl@8417
Diffstat (limited to 'toke.c')
-rw-r--r-- | toke.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -3024,9 +3024,21 @@ Perl_yylex(pTHX) PL_lex_stuff = Nullsv; } else { - attrs = append_elem(OP_LIST, attrs, - newSVOP(OP_CONST, 0, - newSVpvn(s, len))); + if (!PL_in_my && len == 6 && strnEQ(s, "lvalue", len)) + CvLVALUE_on(PL_compcv); + else if (!PL_in_my && len == 6 && strnEQ(s, "locked", len)) + CvLOCKED_on(PL_compcv); + else if (!PL_in_my && len == 6 && strnEQ(s, "method", len)) + CvMETHOD_on(PL_compcv); + /* After we've set the flags, it could be argued that + we don't need to do the attributes.pm-based setting + process, and shouldn't bother appending recognized + flags. To experiment with that, uncomment the + following "else": */ + /* else */ + attrs = append_elem(OP_LIST, attrs, + newSVOP(OP_CONST, 0, + newSVpvn(s, len))); } s = skipspace(d); if (*s == ':' && s[1] != ':') |