This may work, depending on what happened to @_:
package DB; sub get_calling_object { my @foo = caller(2); return $DB::args[0] }
Update: This needs the package declaration.
In reply to Re^2: Identify the package a subroutine is being called from
by chromatic
in thread Identify the package a subroutine is being called from
by Herkum
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |