diff options
author | Nicholas Clark <nick@ccl4.org> | 2005-12-20 13:39:01 +0000 |
---|---|---|
committer | Nicholas Clark <nick@ccl4.org> | 2005-12-20 13:39:01 +0000 |
commit | f776e3cd68509957cc5ab2967a78fb0ad213d8aa (patch) | |
tree | 6bbb9eac354afe8d1433077b0edf1425619110ad | |
parent | 0bfa2a8afc04ca8a47987d5890bbbe751faf4444 (diff) | |
download | perl-f776e3cd68509957cc5ab2967a78fb0ad213d8aa.tar.gz |
gv_fetchpv, gv_fetchpvn and gv_fetchsv take a bitmask of flags, rather
than a simple boolean, so passing FALSE or TRUE is bogus.
p4raw-id: //depot/perl@26415
-rw-r--r-- | doio.c | 2 | ||||
-rw-r--r-- | gv.c | 2 | ||||
-rw-r--r-- | mg.c | 6 | ||||
-rw-r--r-- | op.c | 30 | ||||
-rw-r--r-- | pp.c | 12 | ||||
-rw-r--r-- | pp_hot.c | 14 | ||||
-rw-r--r-- | pp_sys.c | 12 | ||||
-rw-r--r-- | regcomp.c | 2 | ||||
-rw-r--r-- | sv.c | 2 | ||||
-rw-r--r-- | toke.c | 40 | ||||
-rw-r--r-- | universal.c | 2 |
11 files changed, 64 insertions, 60 deletions
@@ -336,7 +336,7 @@ Perl_do_openn(pTHX_ GV *gv, register const char *oname, I32 len, int as_raw, } else { GV *thatgv; - thatgv = gv_fetchpv(type,FALSE,SVt_PVIO); + thatgv = gv_fetchpv(type,0,SVt_PVIO); thatio = GvIO(thatgv); } if (!thatio) { @@ -1202,7 +1202,7 @@ Perl_newIO(pTHX) SvOBJECT_on(io); /* Clear the stashcache because a new IO could overrule a package name */ hv_clear(PL_stashcache); - iogv = gv_fetchpv("FileHandle::", FALSE, SVt_PVHV); + iogv = gv_fetchpv("FileHandle::", 0, SVt_PVHV); /* unless exists($main::{FileHandle}) and defined(%main::FileHandle::) */ if (!(iogv && GvHV(iogv) && HvARRAY(GvHV(iogv)))) iogv = gv_fetchpv("IO::Handle::", TRUE, SVt_PVHV); @@ -1847,7 +1847,7 @@ Perl_magic_setglob(pTHX_ SV *sv, MAGIC *mg) if (!SvOK(sv)) return 0; - gv = gv_fetchsv(sv,TRUE, SVt_PVGV); + gv = gv_fetchsv(sv, GV_ADD, SVt_PVGV); if (sv == (SV*)gv) return 0; if (GvGP(sv)) @@ -2307,12 +2307,12 @@ Perl_magic_set(pTHX_ SV *sv, MAGIC *mg) case '^': Safefree(IoTOP_NAME(GvIOp(PL_defoutgv))); s = IoTOP_NAME(GvIOp(PL_defoutgv)) = savesvpv(sv); - IoTOP_GV(GvIOp(PL_defoutgv)) = gv_fetchsv(sv,TRUE, SVt_PVIO); + IoTOP_GV(GvIOp(PL_defoutgv)) = gv_fetchsv(sv, GV_ADD, SVt_PVIO); break; case '~': Safefree(IoFMT_NAME(GvIOp(PL_defoutgv))); s = IoFMT_NAME(GvIOp(PL_defoutgv)) = savesvpv(sv); - IoFMT_GV(GvIOp(PL_defoutgv)) = gv_fetchsv(sv,TRUE, SVt_PVIO); + IoFMT_GV(GvIOp(PL_defoutgv)) = gv_fetchsv(sv, GV_ADD, SVt_PVIO); break; case '=': IoPAGE_LEN(GvIOp(PL_defoutgv)) = (SvIOK(sv) ? SvIVX(sv) : sv_2iv(sv)); @@ -2034,7 +2034,7 @@ Perl_jmaybe(pTHX_ OP *o) { if (o->op_type == OP_LIST) { OP *o2; - o2 = newSVREF(newGVOP(OP_GV, 0, gv_fetchpv(";", TRUE, SVt_PV))), + o2 = newSVREF(newGVOP(OP_GV, 0, gv_fetchpv(";", GV_ADD, SVt_PV))), o = convert(OP_JOIN, 0, prepend_elem(OP_LIST, o2, o)); } return o; @@ -3213,7 +3213,7 @@ Perl_dofile(pTHX_ OP *term, I32 force_builtin) GV *gv = Nullgv; if (!force_builtin) { - gv = gv_fetchpv("do", FALSE, SVt_PVCV); + gv = gv_fetchpv("do", 0, SVt_PVCV); if (!(gv && GvCVu(gv) && GvIMPORTED_CV(gv))) { GV * const * const gvp = (GV**)hv_fetch(PL_globalstash, "do", 2, FALSE); gv = gvp ? *gvp : Nullgv; @@ -4935,8 +4935,8 @@ Perl_newFORM(pTHX_ I32 floor, OP *o, OP *block) register CV *cv; GV * const gv = o - ? gv_fetchsv(cSVOPo->op_sv, TRUE, SVt_PVFM) - : gv_fetchpv("STDOUT", TRUE, SVt_PVFM); + ? gv_fetchsv(cSVOPo->op_sv, GV_ADD, SVt_PVFM) + : gv_fetchpv("STDOUT", GV_ADD, SVt_PVFM); #ifdef GV_UNIQUE_CHECK if (GvUNIQUE(gv)) { @@ -5466,7 +5466,7 @@ Perl_ck_ftst(pTHX_ OP *o) if (kid->op_type == OP_CONST && (kid->op_private & OPpCONST_BARE)) { OP * const newop = newGVOP(type, OPf_REF, - gv_fetchsv(kid->op_sv, TRUE, SVt_PVIO)); + gv_fetchsv(kid->op_sv, GV_ADD, SVt_PVIO)); op_free(o); o = newop; return o; @@ -5550,7 +5550,7 @@ Perl_ck_fun(pTHX_ OP *o) (kid->op_private & OPpCONST_BARE)) { OP * const newop = newAVREF(newGVOP(OP_GV, 0, - gv_fetchsv(((SVOP*)kid)->op_sv, TRUE, SVt_PVAV) )); + gv_fetchsv(((SVOP*)kid)->op_sv, GV_ADD, SVt_PVAV) )); if (ckWARN2(WARN_DEPRECATED, WARN_SYNTAX)) Perl_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), "Array @%"SVf" missing the @ in argument %"IVdf" of %s()", @@ -5569,7 +5569,7 @@ Perl_ck_fun(pTHX_ OP *o) (kid->op_private & OPpCONST_BARE)) { OP * const newop = newHVREF(newGVOP(OP_GV, 0, - gv_fetchsv(((SVOP*)kid)->op_sv, TRUE, SVt_PVHV) )); + gv_fetchsv(((SVOP*)kid)->op_sv, GV_ADD, SVt_PVHV) )); if (ckWARN2(WARN_DEPRECATED, WARN_SYNTAX)) Perl_warner(aTHX_ packWARN2(WARN_DEPRECATED, WARN_SYNTAX), "Hash %%%"SVf" missing the %% in argument %"IVdf" of %s()", @@ -5600,7 +5600,7 @@ Perl_ck_fun(pTHX_ OP *o) (kid->op_private & OPpCONST_BARE)) { OP * const newop = newGVOP(OP_GV, 0, - gv_fetchsv(((SVOP*)kid)->op_sv, TRUE, SVt_PVIO) ); + gv_fetchsv(((SVOP*)kid)->op_sv, GV_ADD, SVt_PVIO)); if (!(o->op_private & 1) && /* if not unop */ kid == cLISTOPo->op_last) cLISTOPo->op_last = newop; @@ -5746,10 +5746,10 @@ Perl_ck_glob(pTHX_ OP *o) if ((o->op_flags & OPf_KIDS) && !cLISTOPo->op_first->op_sibling) append_elem(OP_GLOB, o, newDEFSVOP()); - if (!((gv = gv_fetchpv("glob", FALSE, SVt_PVCV)) + if (!((gv = gv_fetchpv("glob", 0, SVt_PVCV)) && GvCVu(gv) && GvIMPORTED_CV(gv))) { - gv = gv_fetchpv("CORE::GLOBAL::glob", FALSE, SVt_PVCV); + gv = gv_fetchpv("CORE::GLOBAL::glob", 0, SVt_PVCV); } #if !defined(PERL_EXTERNAL_GLOB) @@ -5759,8 +5759,8 @@ Perl_ck_glob(pTHX_ OP *o) ENTER; Perl_load_module(aTHX_ PERL_LOADMOD_NOIMPORT, newSVpvn("File::Glob", 10), Nullsv, Nullsv, Nullsv); - gv = gv_fetchpv("CORE::GLOBAL::glob", FALSE, SVt_PVCV); - glob_gv = gv_fetchpv("File::Glob::csh_glob", FALSE, SVt_PVCV); + gv = gv_fetchpv("CORE::GLOBAL::glob", 0, SVt_PVCV); + glob_gv = gv_fetchpv("File::Glob::csh_glob", 0, SVt_PVCV); GvCV(gv) = GvCV(glob_gv); (void)SvREFCNT_inc((SV*)GvCV(gv)); GvIMPORTED_CV_on(gv); @@ -6163,7 +6163,7 @@ Perl_ck_require(pTHX_ OP *o) if (!(o->op_flags & OPf_SPECIAL)) { /* Wasn't written as CORE::require */ /* handle override, if any */ - gv = gv_fetchpv("require", FALSE, SVt_PVCV); + gv = gv_fetchpv("require", 0, SVt_PVCV); if (!(gv && GvCVu(gv) && GvIMPORTED_CV(gv))) { GV * const * const gvp = (GV**)hv_fetch(PL_globalstash, "require", 7, FALSE); gv = gvp ? *gvp : Nullgv; @@ -6320,8 +6320,8 @@ S_simplify_sort(pTHX_ OP *o) const char *gvname; if (!(o->op_flags & OPf_STACKED)) return; - GvMULTI_on(gv_fetchpv("a", TRUE, SVt_PV)); - GvMULTI_on(gv_fetchpv("b", TRUE, SVt_PV)); + GvMULTI_on(gv_fetchpv("a", GV_ADD, SVt_PV)); + GvMULTI_on(gv_fetchpv("b", GV_ADD, SVt_PV)); kid = kUNOP->op_first; /* get past null */ if (kid->op_type != OP_SCOPE) return; @@ -191,10 +191,10 @@ PP(pp_rv2gv) if ((PL_op->op_flags & OPf_SPECIAL) && !(PL_op->op_flags & OPf_MOD)) { - SV * const temp = (SV*)gv_fetchsv(sv, FALSE, SVt_PVGV); + SV * const temp = (SV*)gv_fetchsv(sv, 0, SVt_PVGV); if (!temp && (!is_gv_magical_sv(sv,0) - || !(sv = (SV*)gv_fetchsv(sv, TRUE, SVt_PVGV)))) { + || !(sv = (SV*)gv_fetchsv(sv, GV_ADD, SVt_PVGV)))) { RETSETUNDEF; } sv = temp; @@ -202,7 +202,7 @@ PP(pp_rv2gv) else { if (PL_op->op_private & HINT_STRICT_REFS) DIE(aTHX_ PL_no_symref_sv, sv, "a symbol"); - sv = (SV*)gv_fetchsv(sv, TRUE, SVt_PVGV); + sv = (SV*)gv_fetchsv(sv, GV_ADD, SVt_PVGV); } } } @@ -254,16 +254,16 @@ PP(pp_rv2sv) if ((PL_op->op_flags & OPf_SPECIAL) && !(PL_op->op_flags & OPf_MOD)) { - gv = (GV*)gv_fetchsv(sv, FALSE, SVt_PV); + gv = (GV*)gv_fetchsv(sv, 0, SVt_PV); if (!gv && (!is_gv_magical_sv(sv, 0) - || !(gv = (GV*)gv_fetchsv(sv, TRUE, SVt_PV)))) + || !(gv = (GV*)gv_fetchsv(sv, GV_ADD, SVt_PV)))) { RETSETUNDEF; } } else { - gv = (GV*)gv_fetchsv(sv, TRUE, SVt_PV); + gv = (GV*)gv_fetchsv(sv, GV_ADD, SVt_PV); } } sv = GvSVn(gv); @@ -759,10 +759,10 @@ PP(pp_rv2av) if ((PL_op->op_flags & OPf_SPECIAL) && !(PL_op->op_flags & OPf_MOD)) { - gv = (GV*)gv_fetchsv(sv, FALSE, SVt_PVAV); + gv = (GV*)gv_fetchsv(sv, 0, SVt_PVAV); if (!gv && (!is_gv_magical_sv(sv,0) - || !(gv = (GV*)gv_fetchsv(sv, TRUE, SVt_PVAV)))) + || !(gv = (GV*)gv_fetchsv(sv, GV_ADD, SVt_PVAV)))) { RETSETUNDEF; } @@ -770,7 +770,7 @@ PP(pp_rv2av) else { if (PL_op->op_private & HINT_STRICT_REFS) DIE(aTHX_ PL_no_symref_sv, sv, "an ARRAY"); - gv = (GV*)gv_fetchsv(sv, TRUE, SVt_PVAV); + gv = (GV*)gv_fetchsv(sv, GV_ADD, SVt_PVAV); } } else { @@ -886,10 +886,10 @@ PP(pp_rv2hv) if ((PL_op->op_flags & OPf_SPECIAL) && !(PL_op->op_flags & OPf_MOD)) { - gv = (GV*)gv_fetchsv(sv, FALSE, SVt_PVHV); + gv = (GV*)gv_fetchsv(sv, 0, SVt_PVHV); if (!gv && (!is_gv_magical_sv(sv,0) - || !(gv = (GV*)gv_fetchsv(sv, TRUE, SVt_PVHV)))) + || !(gv = (GV*)gv_fetchsv(sv, GV_ADD, SVt_PVHV)))) { RETSETUNDEF; } @@ -897,7 +897,7 @@ PP(pp_rv2hv) else { if (PL_op->op_private & HINT_STRICT_REFS) DIE(aTHX_ PL_no_symref_sv, sv, "a HASH"); - gv = (GV*)gv_fetchsv(sv, TRUE, SVt_PVHV); + gv = (GV*)gv_fetchsv(sv, GV_ADD, SVt_PVHV); } } else { @@ -3021,7 +3021,7 @@ S_method_common(pTHX_ SV* meth, U32* hashp) if (!SvOK(sv) || !(packname) || - !(iogv = gv_fetchsv(sv, FALSE, SVt_PVIO)) || + !(iogv = gv_fetchsv(sv, 0, SVt_PVIO)) || !(ob=(SV*)GvIO(iogv))) { /* this isn't the name of a filehandle either */ @@ -1322,14 +1322,14 @@ PP(pp_leavewrite) if (!IoFMT_NAME(io)) IoFMT_NAME(io) = savepv(GvNAME(gv)); topname = sv_2mortal(Perl_newSVpvf(aTHX_ "%s_TOP", GvNAME(gv))); - topgv = gv_fetchsv(topname, FALSE, SVt_PVFM); + topgv = gv_fetchsv(topname, 0, SVt_PVFM); if ((topgv && GvFORM(topgv)) || - !gv_fetchpv("top",FALSE,SVt_PVFM)) + !gv_fetchpv("top", 0, SVt_PVFM)) IoTOP_NAME(io) = savesvpv(topname); else IoTOP_NAME(io) = savepvn("top", 3); } - topgv = gv_fetchpv(IoTOP_NAME(io),FALSE, SVt_PVFM); + topgv = gv_fetchpv(IoTOP_NAME(io), 0, SVt_PVFM); if (!topgv || !GvFORM(topgv)) { IoLINES_LEFT(io) = IoPAGE_LEN(io); goto forget_top; @@ -2078,7 +2078,7 @@ PP(pp_truncate) IO *io; if (PL_op->op_flags & OPf_SPECIAL) { - tmpgv = gv_fetchsv(POPs, FALSE, SVt_PVIO); + tmpgv = gv_fetchsv(POPs, 0, SVt_PVIO); do_ftruncate_gv: if (!GvIO(tmpgv)) @@ -3109,7 +3109,7 @@ PP(pp_fttty) else if (SvROK(TOPs) && isGV(SvRV(TOPs))) gv = (GV*)SvRV(POPs); else - gv = gv_fetchsv(tmpsv = POPs, FALSE, SVt_PVIO); + gv = gv_fetchsv(tmpsv = POPs, 0, SVt_PVIO); if (GvIO(gv) && IoIFP(GvIOp(gv))) fd = PerlIO_fileno(IoIFP(GvIOp(gv))); @@ -3840,7 +3840,7 @@ PP(pp_fork) if (childpid < 0) RETSETUNDEF; if (!childpid) { - GV * const tmpgv = gv_fetchpv("$", TRUE, SVt_PV); + GV * const tmpgv = gv_fetchpv("$", GV_ADD, SVt_PV); if (tmpgv) { SvREADONLY_off(GvSV(tmpgv)); sv_setiv(GvSV(tmpgv), (IV)PerlProc_getpid()); @@ -6225,7 +6225,7 @@ Perl_save_re_context(pTHX) GV *mgv; char digits[TYPE_CHARS(long)]; const STRLEN len = my_sprintf(digits, "%lu", (long)i); - if ((mgv = gv_fetchpvn_flags(digits, len, FALSE, SVt_PV))) + if ((mgv = gv_fetchpvn_flags(digits, len, 0, SVt_PV))) save_scalar(mgv); } } @@ -6704,7 +6704,7 @@ Perl_sv_2io(pTHX_ SV *sv) Perl_croak(aTHX_ PL_no_usym, "filehandle"); if (SvROK(sv)) return sv_2io(SvRV(sv)); - gv = gv_fetchsv(sv, FALSE, SVt_PVIO); + gv = gv_fetchsv(sv, 0, SVt_PVIO); if (gv) io = GvIO(gv); else @@ -1022,7 +1022,7 @@ S_force_ident(pTHX_ register const char *s, int kind) /* XXX see note in pp_entereval() for why we forgo typo warnings if the symbol must be introduced in an eval. GSAR 96-10-12 */ - gv_fetchpv(s, PL_in_eval ? (GV_ADDMULTI | GV_ADDINEVAL) : TRUE, + gv_fetchpv(s, PL_in_eval ? (GV_ADDMULTI | GV_ADDINEVAL) : GV_ADD, kind == '$' ? SVt_PV : kind == '@' ? SVt_PVAV : kind == '%' ? SVt_PVHV : @@ -2019,7 +2019,8 @@ S_intuit_more(pTHX_ register char *s) weight -= seen[un_char] * 10; if (isALNUM_lazy_if(s+1,UTF)) { scan_ident(s, send, tmpbuf, sizeof tmpbuf, FALSE); - if ((int)strlen(tmpbuf) > 1 && gv_fetchpv(tmpbuf,FALSE, SVt_PV)) + if ((int)strlen(tmpbuf) > 1 + && gv_fetchpv(tmpbuf, 0, SVt_PV)) weight -= 100; else weight -= 10; @@ -2150,7 +2151,7 @@ S_intuit_method(pTHX_ char *start, GV *gv) tmpbuf[len] = '\0'; goto bare_package; } - indirgv = gv_fetchpv(tmpbuf, FALSE, SVt_PVCV); + indirgv = gv_fetchpv(tmpbuf, 0, SVt_PVCV); if (indirgv && GvCVu(indirgv)) return 0; /* filehandle or package name makes it a method */ @@ -2344,13 +2345,13 @@ S_find_in_my_stash(pTHX_ const char *pkgname, I32 len) if (len > 2 && (pkgname[len - 2] == ':' && pkgname[len - 1] == ':') && - (gv = gv_fetchpv(pkgname, FALSE, SVt_PVHV))) + (gv = gv_fetchpv(pkgname, 0, SVt_PVHV))) { return GvHV(gv); /* Foo:: */ } /* use constant CLASS => 'MyClass' */ - if ((gv = gv_fetchpv(pkgname, FALSE, SVt_PVCV))) { + if ((gv = gv_fetchpv(pkgname, 0, SVt_PVCV))) { SV *sv; if (GvCV(gv) && (sv = cv_const_sv(GvCV(gv)))) { pkgname = SvPV_nolen_const(sv); @@ -2863,7 +2864,8 @@ Perl_yylex(pTHX) * at least, set argv[0] to the basename of the Perl * interpreter. So, having found "#!", we'll set it right. */ - SV * const x = GvSV(gv_fetchpv("\030", TRUE, SVt_PV)); /* $^X */ + SV * const x + = GvSV(gv_fetchpv("\030", GV_ADD, SVt_PV)); /* $^X */ assert(SvPOK(x) || SvGMAGICAL(x)); if (sv_eq(x, CopFILESV(PL_curcop))) { sv_setpvn(x, ipath, ipathend - ipath); @@ -3104,7 +3106,7 @@ Perl_yylex(pTHX) case 'T': ftst = OP_FTTEXT; break; case 'B': ftst = OP_FTBINARY; break; case 'M': case 'A': case 'C': - gv_fetchpv("\024",TRUE, SVt_PV); + gv_fetchpv("\024",GV_ADD, SVt_PV); switch (tmp) { case 'M': ftst = OP_FTMTIME; break; case 'A': ftst = OP_FTATIME; break; @@ -4074,7 +4076,7 @@ Perl_yylex(pTHX) const char c = *start; GV *gv; *start = '\0'; - gv = gv_fetchpv(s, FALSE, SVt_PVCV); + gv = gv_fetchpv(s, 0, SVt_PVCV); *start = c; if (!gv) { s = scan_num(s, &yylval); @@ -4168,7 +4170,7 @@ Perl_yylex(pTHX) GV *hgv = Nullgv; /* hidden (loser) */ if (PL_expect != XOPERATOR && (*s != ':' || s[1] != ':')) { CV *cv; - if ((gv = gv_fetchpv(PL_tokenbuf, FALSE, SVt_PVCV)) && + if ((gv = gv_fetchpv(PL_tokenbuf, 0, SVt_PVCV)) && (cv = GvCVu(gv))) { if (GvIMPORTED_CV(gv)) @@ -4269,7 +4271,8 @@ Perl_yylex(pTHX) if (len > 2 && PL_tokenbuf[len - 2] == ':' && PL_tokenbuf[len - 1] == ':') { - if (ckWARN(WARN_BAREWORD) && ! gv_fetchpv(PL_tokenbuf, FALSE, SVt_PVHV)) + if (ckWARN(WARN_BAREWORD) + && ! gv_fetchpv(PL_tokenbuf, 0, SVt_PVHV)) Perl_warner(aTHX_ packWARN(WARN_BAREWORD), "Bareword \"%s\" refers to nonexistent package", PL_tokenbuf); @@ -4281,7 +4284,7 @@ Perl_yylex(pTHX) else { len = 0; if (!gv) - gv = gv_fetchpv(PL_tokenbuf, FALSE, SVt_PVCV); + gv = gv_fetchpv(PL_tokenbuf, 0, SVt_PVCV); } /* if we saw a global override before, get the right name */ @@ -4493,7 +4496,8 @@ Perl_yylex(pTHX) const char *pname = "main"; if (PL_tokenbuf[2] == 'D') pname = HvNAME_get(PL_curstash ? PL_curstash : PL_defstash); - gv = gv_fetchpv(Perl_form(aTHX_ "%s::DATA", pname), TRUE, SVt_PVIO); + gv = gv_fetchpv(Perl_form(aTHX_ "%s::DATA", pname), GV_ADD, + SVt_PVIO); GvMULTI_on(gv); if (!GvIO(gv)) GvIOp(gv) = newIO(); @@ -4649,7 +4653,7 @@ Perl_yylex(pTHX) } case KEY_chdir: - (void)gv_fetchpv("ENV",TRUE, SVt_PVHV); /* may use HOME */ + (void)gv_fetchpv("ENV", GV_ADD, SVt_PVHV); /* may use HOME */ UNI(OP_CHDIR); case KEY_close: @@ -5623,10 +5627,10 @@ Perl_yylex(pTHX) char ctl_l[2]; ctl_l[0] = toCTRL('L'); ctl_l[1] = '\0'; - gv_fetchpv(ctl_l,TRUE, SVt_PV); + gv_fetchpv(ctl_l, GV_ADD, SVt_PV); } #else - gv_fetchpv("\f",TRUE, SVt_PV); /* Make sure $^L is defined */ + gv_fetchpv("\f", GV_ADD, SVt_PV); /* Make sure $^L is defined */ #endif UNI(OP_ENTERWRITE); @@ -5752,7 +5756,7 @@ S_pending_ident(pTHX) table. */ if (pit == '@' && PL_lex_state != LEX_NORMAL && !PL_lex_brackets) { - GV *gv = gv_fetchpv(PL_tokenbuf+1, FALSE, SVt_PVAV); + GV *gv = gv_fetchpv(PL_tokenbuf+1, 0, SVt_PVAV); if ((!gv || ((PL_tokenbuf[0] == '@') ? !GvAV(gv) : !GvHV(gv))) && ckWARN(WARN_AMBIGUOUS)) { @@ -9971,7 +9975,7 @@ S_scan_inputsymbol(pTHX_ char *start) Copy("ARGV",d,5,char); /* Check whether readline() is overriden */ - if (((gv_readline = gv_fetchpv("readline", FALSE, SVt_PVCV)) + if (((gv_readline = gv_fetchpv("readline", 0, SVt_PVCV)) && GvCVu(gv_readline) && GvIMPORTED_CV(gv_readline)) || ((gvp = (GV**)hv_fetch(PL_globalstash, "readline", 8, FALSE)) @@ -10035,7 +10039,7 @@ intro_sym: /* If it's none of the above, it must be a literal filehandle (<Foo::BAR> or <FOO>) so build a simple readline OP */ else { - GV *gv = gv_fetchpv(d,TRUE, SVt_PVIO); + GV *gv = gv_fetchpv(d, GV_ADD, SVt_PVIO); PL_lex_op = readline_overriden ? (OP*)newUNOP(OP_ENTERSUB, OPf_STACKED, append_elem(OP_LIST, diff --git a/universal.c b/universal.c index 824a4d5c66..784fe5378a 100644 --- a/universal.c +++ b/universal.c @@ -851,7 +851,7 @@ XS(XS_PerlIO_get_layers) if (SvROK(sv) && isGV(SvRV(sv))) gv = (GV*)SvRV(sv); else if (SvPOKp(sv)) - gv = gv_fetchsv(sv, FALSE, SVt_PVIO); + gv = gv_fetchsv(sv, 0, SVt_PVIO); } if (gv && (io = GvIO(gv))) { |