X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMooseX-StrictConstructor.git;a=blobdiff_plain;f=lib%2FMooseX%2FStrictConstructor.pm;h=0e3714bae5d4be73a68c040402cb8fc5332e3280;hp=69d671c926438e3d3d623765c50491cd0a26dd90;hb=c94bcaec88348ee09f259bf1bc68a7dbe2689dcc;hpb=2ffa7b600545d76ba73216e6f158ea47b984fb3e diff --git a/lib/MooseX/StrictConstructor.pm b/lib/MooseX/StrictConstructor.pm index 69d671c..0e3714b 100644 --- a/lib/MooseX/StrictConstructor.pm +++ b/lib/MooseX/StrictConstructor.pm @@ -3,7 +3,7 @@ package MooseX::StrictConstructor; use strict; use warnings; -our $VERSION = '0.01'; +our $VERSION = '0.06'; use Moose; use MooseX::Object::StrictConstructor; @@ -15,7 +15,10 @@ sub import return if $caller eq 'main'; - Moose::init_meta( $caller, 'MooseX::Object::StrictConstructor', 'Moose::Meta::Class' ); + Moose::init_meta( $caller, + 'MooseX::Object::StrictConstructor', + 'MooseX::StrictConstructor::Meta::Class', + ); Moose->import( { into => $caller } ); @@ -51,8 +54,8 @@ MooseX::StrictConstructor - Make your object constructors blow up on unknown att Using this class to load Moose instead of just loading using Moose itself makes your constructors "strict". If your constructor is called -with an attribute that your class does not declare, then it calls -"Carp::confess()". This is a great way to catch small typos. +with an attribute init argument that your class does not declare, then +it calls "Carp::confess()". This is a great way to catch small typos. =head2 Subverting Strictness @@ -75,6 +78,13 @@ seen when this class does its checking. } } +=head2 Caveats + +Using this class replaces the default Moose meta class, +C, with its own, +C. If you have your own meta +class, this distro will probably not work for you. + =head1 AUTHOR Dave Rolsky, C<< >>