Hi, all.

I have created a branch topic/strict-constructor, which does what
MooseX::StrictConstructor. I think strict constructor is as useful as
strict.pm,
so I wonder why Moose core doesn't support it alghough
MX::StrictConstructor is recommended by the docs. I think one problem
is the performance, so I have reduced its overhead. According to my
benchmark, my implementation is 15% slower than non-strict constructor
but 30% faster than MX::StructConstructor.

The strict constructor is enabled by the 'strict_constructor' option
of make_immutable:
  __PACKAGE__->meta->make_immutable(strict_constructor => 1);
which doesn't break backward compatibility.

My benchmark script is: http://gist.github.com/312001

This branch is on github:
http://github.com/gfx/moose/commits/topic/strict-constructor
It includes a set of tests, but the document is not yet.

-- 
Goro Fuji (gfx)

Reply via email to