This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
perldiag: Reunite ‘perhaps you forgot to load’
to the other part of the message. diagnostics.pm won’t find it otherwise:
$ perl -Mdiagnostics -we '"foo"->bar'
Can't locate object method "bar" via package "foo" (perhaps you forgot to load
"foo"?) at -e line 1 (#1)
Uncaught exception from user code:
Can't locate object method "bar" via package "foo" (perhaps you forgot to load "foo"?) at -e line 1.
Now we have this:
Can't locate object method "bar" via package "foo" (perhaps you forgot to load
"foo"?) at -e line 1 (#1)
(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
requires a package that has not been loaded.
Uncaught exception from user code:
Can't locate object method "bar" via package "foo" (perhaps you forgot to load "foo"?) at -e line 1.