summaryrefslogtreecommitdiff
path: root/pp_ctl.c
diff options
context:
space:
mode:
authorMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-09-30 15:11:07 +0000
committerMalcolm Beattie <mbeattie@sable.ox.ac.uk>1997-09-30 15:11:07 +0000
commit8206a063cdc1c193b12df1a45cb3a0ee430b5077 (patch)
tree45fb29ee11703ddeadeb8fa6d9673bc12d51394b /pp_ctl.c
parent2ddcc7aa6c936ba8e7a9703319dfd8959bb54574 (diff)
parent3e3baf6d63945cb64e829d6e5c70a7d00f3d3d03 (diff)
downloadperl-8206a063cdc1c193b12df1a45cb3a0ee430b5077.tar.gz
Merge maint-5.004 branch (5.004_01) with mainline.
p4raw-id: //depot/perl@84
Diffstat (limited to 'pp_ctl.c')
-rw-r--r--pp_ctl.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/pp_ctl.c b/pp_ctl.c
index 54524ae677..929be04fa5 100644
--- a/pp_ctl.c
+++ b/pp_ctl.c
@@ -724,7 +724,7 @@ PP(pp_sort)
cx->blk_gimme = G_SCALAR;
PUSHSUB(cx);
if (!CvDEPTH(cv))
- SvREFCNT_inc(cv); /* in preparation for POPSUB */
+ (void)SvREFCNT_inc(cv); /* in preparation for POPSUB */
}
sortcxix = cxstack_ix;
@@ -773,6 +773,7 @@ PP(pp_flip)
sv_setiv(PAD_SV(cUNOP->op_first->op_targ), 1);
if (op->op_flags & OPf_SPECIAL) {
sv_setiv(targ, 1);
+ SETs(targ);
RETURN;
}
else {
@@ -2360,10 +2361,21 @@ PP(pp_require)
if (!tryrsfp) {
if (op->op_type == OP_REQUIRE) {
SV *msg = sv_2mortal(newSVpvf("Can't locate %s in @INC", name));
+ SV *dirmsgsv = NEWSV(0, 0);
+ AV *ar = GvAVn(incgv);
+ I32 i;
if (instr(SvPVX(msg), ".h "))
sv_catpv(msg, " (change .h to .ph maybe?)");
if (instr(SvPVX(msg), ".ph "))
sv_catpv(msg, " (did you run h2ph?)");
+ sv_catpv(msg, " (@INC contains:");
+ for (i = 0; i <= AvFILL(ar); i++) {
+ char *dir = SvPVx(*av_fetch(ar, i, TRUE), na);
+ sv_setpvf(dirmsgsv, " %s", dir);
+ sv_catsv(msg, dirmsgsv);
+ }
+ sv_catpvn(msg, ")", 1);
+ SvREFCNT_dec(dirmsgsv);
DIE("%_", msg);
}