(F) You used the syntax of a method call, but the slot filled by the
object reference or package name contains an expression that returns
-neither an object reference nor a package name. (Perhaps it's null?)
+a defined value which is neither an object reference nor a package name.
+Something like this will reproduce the error:
+
+ $BADREF = 42;
+ process $BADREF 1,2,3;
+ $BADREF->process(1,2,3);
+
+=item Can't call method "%s" on an undefined value
+
+(F) You used the syntax of a method call, but the slot filled by the
+object reference or package name contains an undefined value.
Something like this will reproduce the error:
$BADREF = undef;
!(ob=(SV*)GvIO(iogv)))
{
if (!packname || !isIDFIRST(*packname))
- DIE("Can't call method \"%s\" without a package or object reference", name);
+ DIE("Can't call method \"%s\" %s", name,
+ SvOK(sv)? "without a package or object reference"
+ : "on an undefined value");
stash = gv_stashpvn(packname, packlen, TRUE);
goto fetch;
}