diff --git a/gv.c b/gv.c index 556878505c6b1..9a4da9dbdf7fd 100644 --- a/gv.c +++ b/gv.c @@ -917,12 +917,11 @@ S_gv_fetchmeth_internal(pTHX_ HV* stash, SV* meth, const char* name, STRLEN len, Perl_ck_warner(aTHX_ packWARN(WARN_SYNTAX), "While trying to resolve method call %.*s->%.*s()" " can not locate package %" SVf_QUOTEDPREFIX " yet it is mentioned in @%.*s::ISA" - " (perhaps you forgot to load %" SVf_QUOTEDPREFIX "?)", + " (perhaps you forgot to load it?)", (int) hvnamelen, hvname, (int) len, name, SVfARG(linear_sv), - (int) hvnamelen, hvname, - SVfARG(linear_sv)); + (int) hvnamelen, hvname); } } continue; @@ -1263,9 +1262,9 @@ Perl_gv_fetchmethod_pvn_flags(pTHX_ HV *stash, const char *name, const STRLEN le Perl_croak(aTHX_ "Can't locate object method %" UTF8f_QUOTEDPREFIX "" " via package %" SVf_QUOTEDPREFIX "" - " (perhaps you forgot to load %" SVf_QUOTEDPREFIX "?)", + " (perhaps you forgot to load it?)", UTF8fARG(is_utf8, name_end - name, name), - SVfARG(packnamesv), SVfARG(packnamesv)); + SVfARG(packnamesv)); } } } diff --git a/pod/perldiag.pod b/pod/perldiag.pod index 6070fbd01249b..dffa036ca2f48 100644 --- a/pod/perldiag.pod +++ b/pod/perldiag.pod @@ -1169,8 +1169,7 @@ unable to locate this library. See L. functioning as a class, but that package doesn't define that particular method, nor does any of its base classes. See L. -=item Can't locate object method "%s" via package "%s" (perhaps you forgot -to load "%s"?) +=item Can't locate object method "%s" via package "%s" (perhaps you forgot to load it?) (F) You called a method on a class that did not exist, and the method could not be found in UNIVERSAL. This often means that a method @@ -7820,7 +7819,7 @@ can be determined from the template alone. This is not possible if it contains any of the codes @, /, U, u, w or a *-length. Redesign the template. -=item While trying to resolve method call %s->%s() can not locate package "%s" yet it is mentioned in @%s::ISA (perhaps you forgot to load "%s"?) +=item While trying to resolve method call %s->%s() can not locate package "%s" yet it is mentioned in @%s::ISA (perhaps you forgot to load it?) (W syntax) It is possible that the C<@ISA> contains a misspelled or never loaded package name, which can result in perl choosing an unexpected parent diff --git a/pp_sys.c b/pp_sys.c index 6ae5cd5aa79e1..c0dafcd7ee8ff 100644 --- a/pp_sys.c +++ b/pp_sys.c @@ -951,8 +951,8 @@ PP(pp_tie) : newSVpvs_flags("main", SVs_TEMP); DIE(aTHX_ "Can't locate object method %" PVf_QUOTEDPREFIX " via package %" SVf_QUOTEDPREFIX - " (perhaps you forgot to load %" SVf_QUOTEDPREFIX "?)", - methname, SVfARG(stashname), SVfARG(stashname)); + " (perhaps you forgot to load it?)", + methname, SVfARG(stashname)); } } else if (!(gv = gv_fetchmethod(stash, methname))) { diff --git a/t/lib/warnings/gv b/t/lib/warnings/gv index 2caf2d36b582a..0a7a4ef0a2ae9 100644 --- a/t/lib/warnings/gv +++ b/t/lib/warnings/gv @@ -28,7 +28,7 @@ Undefined subroutine &main::joe called at - line 3. use warnings 'syntax' ; @ISA = qw(Fred); __PACKAGE__->joe() EXPECT -While trying to resolve method call main->joe() can not locate package "Fred" yet it is mentioned in @main::ISA (perhaps you forgot to load "Fred"?) at - line 3. +While trying to resolve method call main->joe() can not locate package "Fred" yet it is mentioned in @main::ISA (perhaps you forgot to load it?) at - line 3. Can't locate object method "joe" via package "main" at - line 3. ######## # gv.c @@ -57,7 +57,7 @@ $a = bless [], 'C'; $a->foo(); __END__ EXPECT -While trying to resolve method call C->foo() can not locate package "A" yet it is mentioned in @C::ISA (perhaps you forgot to load "A"?) at - line 18. +While trying to resolve method call C->foo() can not locate package "A" yet it is mentioned in @C::ISA (perhaps you forgot to load it?) at - line 18. I'm in B's foo ######## # gv.c diff --git a/t/op/tie.t b/t/op/tie.t index 9cc1599331a69..73998113c5761 100644 --- a/t/op/tie.t +++ b/t/op/tie.t @@ -930,7 +930,7 @@ sub IO::File::TIEARRAY { } fileno FOO; tie @a, "FOO" EXPECT -Can't locate object method "TIEARRAY" via package "FOO" (perhaps you forgot to load "FOO"?) at - line 5. +Can't locate object method "TIEARRAY" via package "FOO" (perhaps you forgot to load it?) at - line 5. ######## # tie into empty package name tie $foo, ""; diff --git a/t/run/fresh_perl.t b/t/run/fresh_perl.t index 88a64ad583913..3899cbae57638 100644 --- a/t/run/fresh_perl.t +++ b/t/run/fresh_perl.t @@ -81,7 +81,7 @@ $array[128]=1 ######## $x=0x0eabcd; print $x->ref; EXPECT -Can't locate object method "ref" via package "961485" (perhaps you forgot to load "961485"?) at - line 1. +Can't locate object method "ref" via package "961485" (perhaps you forgot to load it?) at - line 1. ######## chop ($str .= ); ########