http://qs1969.pair.com?node_id=418157


in reply to Mutator chaining considered harmful

I wrote about this in my use.perl journal at http://use.perl.org/~Revelation/journal/12867.

Looking back, I had to major problems (that weren't all that well articulated):
  • Chained method calls make backwards compatibility hard to do, if you make an attribute into its own object at any time. You can't use Want.pm, because either way you want an object.
  • Chained method calls force a person reading to check whether a mutator has returned the same object or a more specific object.

    I agree with you. Not a big fan.