Is there a way to determine if a subroutine is called as a method (using @ ISA sensing) or as a simple subroutine? Perhaps with some extension to the supercaller () module?
For example, given
package Ad::Hoc; sub func() { ... }
How func() distinguishes between the following two calls:
Ad::Hoc->func;
(I know the desire to do this is a likely indication of poor design β’.)
methods perl
pilcrow
source share