summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2014-09-24 00:37:58 -0700
committerFather Chrysostomos <sprout@cpan.org>2014-09-24 00:37:58 -0700
commitecf05a582e3c4c0f74622847331af430479c4fcb (patch)
tree85f4cb5bbd727d64bcbf6c173eb8731f66cb87fe /pp_hot.c
parent5e8814954c268f117d70c5156096c5bf7bb1cff7 (diff)
downloadperl-ecf05a582e3c4c0f74622847331af430479c4fcb.tar.gz
Add flags to cv_name; allow unqualified retval
One of the main purposes of cv_name was to provide a way for CPAN mod- ules easily to obtain the name of a sub. As written, it was not actually sufficient, as some modules, such as Devel::Declare, need an unqualified name. So I am breaking compatibility with 5.21.4 (which introduced cv_name, but is only a dev release) by adding a flags parameter.
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 4f9519de67..63e0836f39 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2624,7 +2624,7 @@ PP(pp_entersub)
/* anonymous or undef'd function leaves us no recourse */
if (CvLEXICAL(cv) && CvHASGV(cv))
DIE(aTHX_ "Undefined subroutine &%"SVf" called",
- SVfARG(cv_name(cv, NULL)));
+ SVfARG(cv_name(cv, NULL, 0)));
if (CvANON(cv) || !CvHASGV(cv)) {
DIE(aTHX_ "Undefined subroutine called");
}
@@ -2830,7 +2830,7 @@ Perl_sub_crush_depth(pTHX_ CV *cv)
Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on anonymous subroutine");
else {
Perl_warner(aTHX_ packWARN(WARN_RECURSION), "Deep recursion on subroutine \"%"SVf"\"",
- SVfARG(cv_name(cv,NULL)));
+ SVfARG(cv_name(cv,NULL,0)));
}
}