in reply to Re^2: current/active package
in thread current/active package

the object was never blessed.
There is no object at all. Note that the OP's call of woot is done like this:

package main; bar->woot();
This means that he is writing a package name to the left of ->, i.e. woot is might be something like a constructor. So you don't have an object, but you do have a package name.

-- 
Ronald Fischer <ynnor@mm.st>

Replies are listed 'Best First'.
Re^4: current/active package
by toddfreed (Novice) on Sep 25, 2009 at 14:10 UTC
    In the example, there are no objects. This is supposed to be invoking a package-level method with ISA inheritance, knowing the package you are in, and the package the sub was invoked upon. I realize that in the example, $_[0] = the package the sub was invoked upon. But aren't there other ways to invoke the function in which that will not be true? What about bar::woot() ???

      But aren't there other ways to invoke the function in which that will not be true?

      Yes. The only difference between a subroutine call, a static method call, a virtual object method call and a non-virtual object method call is in how the sub is called. If it's called improperly, it's a bug, and it will result in buggy behaviour.

      What about bar::woot() ???

      bar::woot() doesn't exist, so you'll get a run-time error.