in reply to Unlimited chaining (is there a way to detect this?)

1. Is there a technical term for this thing (other than "method chaining" of course!)?
AFIAK, "method chaining" is it.
2. Is it possible to detect it? (caller does not seem to give any info for this)
Want::want('OBJECT') does what it sounds like you, err, want.
  • Comment on Re: Unlimited chaining (is there a way to detect this?)

Replies are listed 'Best First'.
Re^2: Unlimited chaining (is there a way to detect this?)
by Burak (Chaplain) on Jan 06, 2008 at 20:45 UTC
    hmmm... I didn't get how will want('OBJECT') will help since bar() only returns an object...
      By "Is it possible to detect it?" I was assuming you meant detect when the return from the current method will be the object of a method call. That's what want('OBJECT') does. From your other replies, it seems what you are looking for is somehow to detect when a method is called on its previous return "too many" times. I'm not sure what the problem calling code would look like, though.