You can invoke a subroutine as a method using the two syntaxes in the example below.
But you can also invoke it not as an object.
#====================================================
package Opa;
sub opa{
$first= shift;
$second= shift;
print "Opa $first -- $second\n";
}
package main;
# as object:
Opa->opa("uno");
opa Opa ("uno");
# not as object
Opa::opa("uno","segundo");
Opa::opa("Opa","uno");
#====================================================
It there a way, from inside the subroutine, to know "in general", what kind of invocation a sub has received?.