http://www.perlmonks.org?node_id=352541


in reply to Re: Re: Change the parent of an instance
in thread Change the parent of an instance

What I'm suggesting is that you are thinking about it at the wrong level. What's important to your program might not be whether or not the object is a foe but rather whether or not it is carryable. Each kind of object may have unique rules about when it is carryable. In general, the idea is to push as much of the decision-making about how an object will behave in a certain situation into the object itself (by asking it with methods like this) rather than have some other code that decides what the object can do based on what type it is.
  • Comment on Re: Re: Re: Change the parent of an instance