diff options
author | Nicholas Clark <nick@ccl4.org> | 2006-12-01 22:28:11 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2006-12-01 22:28:11 +0000 |
commit | a9ef256d686ebab6464dfd2ad06eb0aff1240f34 (patch) | |
tree | 16afeb0a38057ec7b2810d2b5129ed25233aa258 /pp_hot.c | |
parent | 2adc4a427a258fb352ae019b2f0f41d98117e1d3 (diff) | |
download | perl-a9ef256d686ebab6464dfd2ad06eb0aff1240f34.tar.gz |
Remove the pp_entersub specific logic from S_get_db_sub.
p4raw-id: //depot/perl@29433
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -2683,7 +2683,7 @@ PP(pp_leavesublv) } -STATIC CV * +STATIC void S_get_db_sub(pTHX_ SV **svp, CV *cv) { dVAR; @@ -2714,11 +2714,6 @@ S_get_db_sub(pTHX_ SV **svp, CV *cv) (void)SvIOK_on(dbsv); SvIV_set(dbsv, PTR2IV(cv)); /* Do it the quickest way */ } - - if (CvISXSUB(cv)) - PL_curcopdb = PL_curcop; - cv = GvCV(PL_DBsub); - return cv; } PP(pp_entersub) @@ -2828,7 +2823,11 @@ try_autoload: if (CvASSERTION(cv) && PL_DBassertion) sv_setiv(PL_DBassertion, 1); - cv = get_db_sub(&sv, cv); + get_db_sub(&sv, cv); + if (CvISXSUB(cv)) + PL_curcopdb = PL_curcop; + cv = GvCV(PL_DBsub); + if (!cv || (!CvXSUB(cv) && !CvSTART(cv))) DIE(aTHX_ "No DB::sub routine defined"); } |