X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=gv.c;h=665825963f461f06b29a443563aacded4b5e6e3e;hb=8490252049bf42d3d2f75d89178a8682bf22ba74;hp=a18304e5f3f2e410492871b9ea91c4226a69f1b2;hpb=46fc3d4c69a0adf236bfcba70daee7fd597cf30d;p=p5sagit%2Fp5-mst-13.2.git diff --git a/gv.c b/gv.c index a18304e..6658259 100644 --- a/gv.c +++ b/gv.c @@ -79,7 +79,7 @@ char *name; sv_setpv(GvSV(gv), name); if (*name == '/' && (instr(name, "/lib/") || instr(name, ".pm"))) GvMULTI_on(gv); - if (perldb) + if (PERLDB_LINE) hv_magic(GvHVn(gv_AVadd(gv)), gv, 'L'); return gv; } @@ -275,8 +275,8 @@ I32 autoload; --nsplit; if ((nsplit - origname) == 5 && strnEQ(origname, "SUPER", 5)) { /* ->SUPER::method should really be looked up in original stash */ - SV *tmpstr = sv_2mortal(newSVpv(HvNAME(curcop->cop_stash), 0)); - sv_catpvn(tmpstr, "::SUPER", 7); + SV *tmpstr = sv_2mortal(newSVpvf("%s::SUPER", + HvNAME(curcop->cop_stash))); stash = gv_stashpvn(SvPVX(tmpstr), SvCUR(tmpstr), TRUE); DEBUG_o( deb("Treating %s as %s::%s\n", origname, HvNAME(stash), name) ); @@ -827,7 +827,9 @@ newIO() sv_upgrade((SV *)io,SVt_PVIO); SvREFCNT(io) = 1; SvOBJECT_on(io); - iogv = gv_fetchpv("IO::Handle::", TRUE, SVt_PVHV); + iogv = gv_fetchpv("FileHandle::", FALSE, SVt_PVHV); + if (!iogv) + iogv = gv_fetchpv("IO::Handle::", TRUE, SVt_PVHV); SvSTASH(io) = (HV*)SvREFCNT_inc(GvHV(iogv)); return io; } @@ -1179,13 +1181,11 @@ int flags; case copy_amg: { SV* ref=SvRV(left); - if (!SvROK(ref) && SvTYPE(ref) <= SVt_PVMG) { /* Just to be - * extra - * causious, - * maybe in some - * additional - * cases sv_setsv - * is safe too */ + if (!SvROK(ref) && SvTYPE(ref) <= SVt_PVMG) { + /* + * Just to be extra cautious. Maybe in some + * additional cases sv_setsv is safe, too. + */ SV* newref = newSVsv(ref); SvOBJECT_on(newref); SvSTASH(newref) = (HV*)SvREFCNT_inc(SvSTASH(ref)); @@ -1242,7 +1242,7 @@ int flags; && !(flags & AMGf_unary)) { /* We look for substitution for * comparison operations and - * concatendation */ + * concatenation */ if (method==concat_amg || method==concat_ass_amg || method==repeat_amg || method==repeat_ass_amg) { return NULL; /* Delegate operation to string conversion */ @@ -1298,7 +1298,7 @@ int flags; if (amtp && amtp->fallback >= AMGfallYES) { DEBUG_o( deb("%s", SvPVX(msg)) ); } else { - croak("%S", msg); + croak("%_", msg); } return NULL; } @@ -1341,7 +1341,7 @@ int flags; ENTER; SAVESPTR(op); op = (OP *) &myop; - if (perldb && curstash != debstash) + if (PERLDB_SUB && curstash != debstash) op->op_private |= OPpENTERSUB_DB; PUTBACK; pp_pushmark();