summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorAndy Lester <andy@petdance.com>2005-07-03 13:31:56 -0500
committerSteve Hay <SteveHay@planit.com>2005-07-04 12:30:50 +0000
commitb64e5050699224c037d91354e38766884caa0910 (patch)
tree38f329ba2a365c8eec6078887704f6e2c59562c6 /toke.c
parentc941fb51a763b50ea8ceb343cf253ac80c4ca160 (diff)
downloadperl-b64e5050699224c037d91354e38766884caa0910.tar.gz
Post-YAPC consting, now with an attachment!
Message-ID: <20050703233156.GA20967@petdance.com> p4raw-id: //depot/perl@25067
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/toke.c b/toke.c
index efdd214624..22a975c134 100644
--- a/toke.c
+++ b/toke.c
@@ -3665,10 +3665,10 @@ Perl_yylex(pTHX)
s = skipspace(s);
if ((PL_expect != XREF || PL_oldoldbufptr == PL_last_lop) && intuit_more(s)) {
- char *t;
if (*s == '[') {
PL_tokenbuf[0] = '@';
if (ckWARN(WARN_SYNTAX)) {
+ char *t;
for(t = s + 1;
isSPACE(*t) || isALNUM_lazy_if(t,UTF) || *t == '$';
t++) ;
@@ -3683,6 +3683,7 @@ Perl_yylex(pTHX)
}
}
else if (*s == '{') {
+ char *t;
PL_tokenbuf[0] = '%';
if (ckWARN(WARN_SYNTAX) && strEQ(PL_tokenbuf+1, "SIG") &&
(t = strchr(s, '}')) && (t = strchr(t, '=')))
@@ -5524,9 +5525,9 @@ S_pending_ident(pTHX)
/* might be an "our" variable" */
if (PAD_COMPNAME_FLAGS(tmp) & SVpad_OUR) {
/* build ops for a bareword */
- HV *stash = PAD_COMPNAME_OURSTASH(tmp);
- HEK *stashname = HvNAME_HEK(stash);
- SV *sym = newSVhek(stashname);
+ HV * const stash = PAD_COMPNAME_OURSTASH(tmp);
+ HEK * const stashname = HvNAME_HEK(stash);
+ SV * const sym = newSVhek(stashname);
sv_catpvn(sym, "::", 2);
sv_catpv(sym, PL_tokenbuf+1);
yylval.opval = (OP*)newSVOP(OP_CONST, 0, sym);