summaryrefslogtreecommitdiff
path: root/pp_hot.c
diff options
context:
space:
mode:
authorFather Chrysostomos <sprout@cpan.org>2012-07-07 23:46:52 -0700
committerFather Chrysostomos <sprout@cpan.org>2012-09-15 22:45:00 -0700
commit7d2057d821be137073b284c6ce586dfd519fd13b (patch)
treedcc6fedbb5335378a38cc5631498fa882efd9719 /pp_hot.c
parentb0305fa36f2ab4eebf4c0efdf7cfb2a4c20de12d (diff)
downloadperl-7d2057d821be137073b284c6ce586dfd519fd13b.tar.gz
‘Undefined subroutine &foo called’ for lex subs
instead of just ‘Undefined subroutine called’ without the name.
Diffstat (limited to 'pp_hot.c')
-rw-r--r--pp_hot.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/pp_hot.c b/pp_hot.c
index 0d70dfc1f5..45c5eb7d68 100644
--- a/pp_hot.c
+++ b/pp_hot.c
@@ -2625,8 +2625,12 @@ PP(pp_entersub)
SV* sub_name;
/* anonymous or undef'd function leaves us no recourse */
- if (CvANON(cv) || !(gv = CvGV(cv)))
+ if (CvANON(cv) || !(gv = CvGV(cv))) {
+ if (CvNAMED(cv))
+ DIE(aTHX_ "Undefined subroutine &%"HEKf" called",
+ HEKfARG(CvNAME_HEK(cv)));
DIE(aTHX_ "Undefined subroutine called");
+ }
/* autoloaded stub? */
if (cv != GvCV(gv)) {