diff options
author | Father Chrysostomos <sprout@cpan.org> | 2013-06-23 12:06:11 -0700 |
---|---|---|
committer | Father Chrysostomos <sprout@cpan.org> | 2013-06-23 12:06:11 -0700 |
commit | bdbfc51a7bc15a2f0a187c1ef09a16838a4c9915 (patch) | |
tree | d19609ab2341d791281ead3df2f3e72d8d04d84b /pp.c | |
parent | 7b3b090481956031f1fcd4f2190cb437c9bbe815 (diff) | |
download | perl-bdbfc51a7bc15a2f0a187c1ef09a16838a4c9915.tar.gz |
Stop undef &foo from crashing on lex subs
Diffstat (limited to 'pp.c')
-rw-r--r-- | pp.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -973,7 +973,12 @@ PP(pp_undef) "Constant subroutine %"SVf" undefined", SVfARG(CvANON((const CV *)sv) ? newSVpvs_flags("(anonymous)", SVs_TEMP) - : sv_2mortal(newSVhek(GvENAME_HEK(CvGV((const CV *)sv)))))); + : sv_2mortal(newSVhek( + CvNAMED(sv) + ? CvNAME_HEK((CV *)sv) + : GvENAME_HEK(CvGV((const CV *)sv)) + )) + )); /* FALLTHROUGH */ case SVt_PVFM: { |