in reply to Re: Method Chaining and Accessors
in thread Method Chaining and Accessors

While chaining is neato and all, I can't think of a good reason to support this use. What's wrong with simply passing a hash of configuration information to your constructor?

Besides what grinder has already mentioned, there's an inability to force the order of the operations.

For instance, in SOAP::Lite, there are some settings (eg, 'service') that affect mutliple parameters, so I need to ensure that they're called first, and then the ones I want to individually override.

Now, in your case, you passed a list, so the method could just splice off the front and make sure they were applied in the correct order -- if you had used a hash, that wouldn't have been possible.