in reply to Searching for an alternative to $0

There's the compile time "directive" __PACKAGE__ or you could fiddle with caller.

Update I just re-read what you wrote. __FILE__ might be more of what you're looking for.