diff options
Diffstat (limited to 'gv.c')
-rw-r--r-- | gv.c | 22 |
1 files changed, 10 insertions, 12 deletions
@@ -254,8 +254,8 @@ Perl_gv_fetchmeth(pTHX_ HV *stash, const char *name, STRLEN len, I32 level) HV* basestash = gv_stashsv(sv, FALSE); if (!basestash) { if (ckWARN(WARN_MISC)) - Perl_warner(aTHX_ packWARN(WARN_MISC), "Can't locate package %s for @%s::ISA", - SvPVX(sv), HvNAME(stash)); + Perl_warner(aTHX_ packWARN(WARN_MISC), "Can't locate package %"SVf" for @%s::ISA", + sv, HvNAME(stash)); continue; } gv = gv_fetchmeth(basestash, name, len, @@ -1328,21 +1328,19 @@ Perl_Gv_AMupdate(pTHX_ HV *stash) /* GvSV contains the name of the method. */ GV *ngv = Nullgv; - DEBUG_o( Perl_deb(aTHX_ "Resolving method `%.256s' for overloaded `%s' in package `%.256s'\n", - SvPV_nolen(GvSV(gv)), cp, HvNAME(stash)) ); + DEBUG_o( Perl_deb(aTHX_ "Resolving method `%.256"SVf"' for overloaded `%s' in package `%.256s'\n", + GvSV(gv), cp, HvNAME(stash)) ); if (!SvPOK(GvSV(gv)) || !(ngv = gv_fetchmethod_autoload(stash, SvPVX(GvSV(gv)), FALSE))) { /* Can be an import stub (created by `can'). */ - if (GvCVGEN(gv)) { - Perl_croak(aTHX_ "Stub found while resolving method `%.256s' overloading `%s' in package `%.256s'", - (SvPOK(GvSV(gv)) ? SvPVX(GvSV(gv)) : "???" ), - cp, HvNAME(stash)); - } else - Perl_croak(aTHX_ "Can't resolve method `%.256s' overloading `%s' in package `%.256s'", - (SvPOK(GvSV(gv)) ? SvPVX(GvSV(gv)) : "???" ), - cp, HvNAME(stash)); + SV *gvsv = GvSV(gv); + const char *name = SvPOK(gvsv) ? SvPVX(gvsv) : "???"; + Perl_croak(aTHX_ "%s method `%.256s' overloading `%s' in package `%.256s'", + (GvCVGEN(gv) ? "Stub found while resolving" + : "Can't resolve"), + name, cp, HvNAME(stash)); } cv = GvCV(gv = ngv); } |