diff options
author | Father Chrysostomos <sprout@cpan.org> | 2018-02-04 11:13:56 -0800 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2018-02-04 12:22:15 -0800 |
commit | 1e2cfe157cae98578de3c274bc64b8ea032b91e0 (patch) | |
tree | 5bb3ac642280f7de432b1a234004ce6e0aec7a6d /op.c | |
parent | 2ea7b253ec46e8acd1ff2b09220c60eed34cd337 (diff) | |
download | perl-1e2cfe157cae98578de3c274bc64b8ea032b91e0.tar.gz |
Disable CV-in-stash optimization
outside of the main package.
Instead of actually reverting to the previous logic that excluded
packages other that main as a side effect of the logic being
faulty, this time I am checking for the main package explicitly.
Diffstat (limited to 'op.c')
-rw-r--r-- | op.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -9847,9 +9847,12 @@ Perl_newATTRSUB_x(pTHX_ I32 floor, OP *o, OP *proto, OP *attrs, Also, we may be called from load_module at run time, so PL_curstash (which sets CvSTASH) may not point to the stash the sub is stored in. */ + /* XXX This optimization is currently disabled for packages other + than main, since there was too much CPAN breakage. */ const I32 flags = ec ? GV_NOADD_NOINIT : (IN_PERL_RUNTIME && PL_curstash != CopSTASH(PL_curcop)) + || PL_curstash != PL_defstash || memchr(name, ':', namlen) || memchr(name, '\'', namlen) ? gv_fetch_flags : GV_ADDMULTI | GV_NOINIT | GV_NOTQUAL; |