diff options
author | Father Chrysostomos <sprout@cpan.org> | 2012-05-26 06:00:01 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2012-06-07 08:18:53 -0700 |
commit | 6954f42f948dcf1dba2014aa06dd5c33b7561992 (patch) | |
tree | ae3709c7181f41b050a51cd1f510ab5b9556ac6e /pp.c | |
parent | bf3d870f8b8accd379ab520c1ff1daa10317d27d (diff) | |
download | perl-6954f42f948dcf1dba2014aa06dd5c33b7561992.tar.gz |
Make prototype call FETCH before checking CORE:: prefix
$ perl5.16.0 -e '"CORE::length" =~ /(.*)/; warn prototype $1;'
Warning: something's wrong at -e line 1.
$ perl5.16.0 -e 'warn prototype "CORE::length"'
_ at -e line 1.
Since sv_2cv calls get-magic, the easiest solution is to copy the
argument if it is magical.
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -432,6 +432,7 @@ PP(pp_prototype) GV *gv; SV *ret = &PL_sv_undef; + if (SvGMAGICAL(TOPs)) SETs(sv_mortalcopy(TOPs)); if (SvPOK(TOPs) && SvCUR(TOPs) >= 7) { const char * s = SvPVX_const(TOPs); if (strnEQ(s, "CORE::", 6)) { |