diff options
author | bharanee rathna <unknown> | 2007-12-11 07:25:21 -0800 |
---|---|---|
committer | Steve Peters <steve@fisharerojo.org> | 2008-11-14 14:29:53 +0000 |
commit | 1ad62f649328dc563f7f21be3c384f5adf18af1d (patch) | |
tree | 5c3d6b8a5c665965a82a67619c2a450a4ea89740 /pp_hot.c | |
parent | 6fd69bbe2bea498b179902913d94c1f09d136b0c (diff) | |
download | perl-1ad62f649328dc563f7f21be3c384f5adf18af1d.tar.gz |
[perl #48489] patch to fix perl bug #7013
From: "bharanee rathna" (via RT) <perlbug-followup@perl.org>
Message-ID: <rt-3.6.HEAD-28750-1197415521-1978.48489-75-0@perl.org>
Just the pp_hot.c portion of this patch applied along with removing
the TODO from the test added in the previous change.
p4raw-id: //depot/perl@34833
Diffstat (limited to 'pp_hot.c')
-rw-r--r-- | pp_hot.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -2774,7 +2774,14 @@ try_autoload: Perl_get_db_sub(aTHX_ &sv, cv); if (CvISXSUB(cv)) PL_curcopdb = PL_curcop; - cv = GvCV(PL_DBsub); + if (CvLVALUE(cv)) { + /* check for lsub that handles lvalue subroutines */ + cv = GvCV(gv_HVadd(gv_fetchpv("DB::lsub", GV_ADDMULTI, SVt_PVHV))); + /* if lsub not found then fall back to DB::sub */ + if (!cv) cv = GvCV(PL_DBsub); + } else { + cv = GvCV(PL_DBsub); + } if (!cv || (!CvXSUB(cv) && !CvSTART(cv))) DIE(aTHX_ "No DB::sub routine defined"); |