in reply to How called was &I?

The above discussion is very interesting, what follows is more or less the condensed (and hopefully clearer) conclusion:

You can only distinguish between the first three and the last three calls:

package Classname; sub method { print ref($_[0]) ? 'Object method' : 'Class method'; print "\n"; } package main; my $obj = bless {},Classname; my $arg = 1; # calls here method $obj $arg; Classname::method( $obj, $arg); # added Classname:: $obj->method( $arg); "Classname"->method( $arg); method Classname $arg; Classname::method( "Classname", $arg); # added Classname:: __END__ prints: Object method Object method Object method Class method Class method Class method
Also note (as pointed out above) that the Classname::method calls (so, calls 2 and 6) do not support inheritance, as they are not actual method calls, but 'normal' subroutine calls pretending to be method calls.
-- Joost downtime n. The period during which a system is error-free and immune from user input.