On Mar 4, 2010, at 5:55 PM, Karen Etheridge wrote:
On Wed, Mar 03, 2010 at 12:52:56PM -0800, Darren Duncan wrote:
Now, perhaps a bigger question that one might ask, is why wouldn't Moose
use MooseX::StrictConstructor's semantics by default?

The main reason I can think of for the current behavior is that you may
want objects to have constructor parameters that don't correspond to
attributes, and you would be using BUILD to map them.

I've wondered this myself. I don't want arbitrary fields springing into
existence in my object,

They won't, Moose will *not* add any slots to you object instance other then the ones you define as attributes. The extra params are not added to the instance, they are simply passed in the $params HASH to BUILD only.

- Stevan

Reply via email to