in reply to find the package name of an inherited object from inside the parent

__PACKAGE__ is a constant like __FILE__ and __LINE__. What you might want is ref, which returns the class a reference is blessed into.

Just be advised that outside of debugging, there is very little you should do based on the class name.

Replies are listed 'Best First'.
Re^2: find the package name of an inherited object from inside the parent
by tomgracey (Scribe) on Jul 07, 2013 at 09:27 UTC
    Oh yeah! ref($self)! That really was a stupid question, apologies...