summaryrefslogtreecommitdiff
path: root/toke.c
diff options
context:
space:
mode:
authorGerard Goossen <gerard@tty.nl>2007-06-27 15:04:00 +0200
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-07-07 08:07:58 +0000
commitc631f32bfcc8ba9f8f86e235471af51a82d2b0ee (patch)
tree19d22a0677f435cdb07dc8d695f823d16ef9401d /toke.c
parentd5d3e0f0cac42b271aa6d30a69d6eff7e2c063c2 (diff)
downloadperl-c631f32bfcc8ba9f8f86e235471af51a82d2b0ee.tar.gz
MAD: disable constant subs when PL_madskills
Message-ID: <20070627110400.GC11336@ostwald> p4raw-id: //depot/perl@31554
Diffstat (limited to 'toke.c')
-rw-r--r--toke.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/toke.c b/toke.c
index b2b6ba1f72..e84e18cadd 100644
--- a/toke.c
+++ b/toke.c
@@ -5430,18 +5430,7 @@ Perl_yylex(pTHX)
d++;
if (*d == ')' && (sv = gv_const_sv(gv))) {
s = d + 1;
-#ifdef PERL_MAD
- if (PL_madskills) {
- char *par = SvPVX(PL_linestr) + PL_realtokenstart;
- sv_catpvn(PL_thistoken, par, s - par);
- if (PL_nextwhite) {
- sv_free(PL_nextwhite);
- PL_nextwhite = 0;
- }
- }
- else
-#endif
- goto its_constant;
+ goto its_constant;
}
}
#ifdef PERL_MAD
@@ -5488,7 +5477,7 @@ Perl_yylex(pTHX)
"Ambiguous use of -%s resolved as -&%s()",
PL_tokenbuf, PL_tokenbuf);
/* Check for a constant sub */
- if ((sv = gv_const_sv(gv)) && !PL_madskills) {
+ if ((sv = gv_const_sv(gv))) {
its_constant:
SvREFCNT_dec(((SVOP*)yylval.opval)->op_sv);
((SVOP*)yylval.opval)->op_sv = SvREFCNT_inc_simple(sv);