diff options
author | Gerard Goossen <gerard@tty.nl> | 2007-06-27 15:04:00 +0200 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-07-07 08:07:58 +0000 |
commit | c631f32bfcc8ba9f8f86e235471af51a82d2b0ee (patch) | |
tree | 19d22a0677f435cdb07dc8d695f823d16ef9401d /toke.c | |
parent | d5d3e0f0cac42b271aa6d30a69d6eff7e2c063c2 (diff) | |
download | perl-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.c | 15 |
1 files changed, 2 insertions, 13 deletions
@@ -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); |