summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorGurusamy Sarathy <gsar@cpan.org>2000-04-24 04:56:08 +0000
committerGurusamy Sarathy <gsar@cpan.org>2000-04-24 04:56:08 +0000
commit811a4de936cdd31b057f2952efd5352bfccbaef0 (patch)
tree7f96a2bd66ab4c2e752ed8950df1f17601efc71f /pp_ctl.c
parent874b18133d8cd6ab29e7805e88ba1ecb668b632a (diff)
downloadperl-811a4de936cdd31b057f2952efd5352bfccbaef0.tar.gz
caller() wasn't returning the right number of elements for
eval {...} p4raw-id: //depot/perl@5914
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index acbcc7e72f..7a2eb20cf3 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -1521,15 +1521,21 @@ PP(pp_caller)
else
PUSHs(sv_2mortal(newSViv(gimme & G_ARRAY)));
if (CxTYPE(cx) == CXt_EVAL) {
+ /* eval STRING */
if (cx->blk_eval.old_op_type == OP_ENTEREVAL) {
PUSHs(cx->blk_eval.cur_text);
PUSHs(&PL_sv_no);
}
- /* try blocks have old_namesv == 0 */
+ /* require */
else if (cx->blk_eval.old_namesv) {
PUSHs(sv_2mortal(newSVsv(cx->blk_eval.old_namesv)));
PUSHs(&PL_sv_yes);
}
+ /* eval BLOCK (try blocks have old_namesv == 0) */
+ else {
+ PUSHs(&PL_sv_undef);
+ PUSHs(&PL_sv_undef);
+ }
}
else {
PUSHs(&PL_sv_undef);