diff --git a/Changes b/Changes index 8b29723..f1bb399 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ + - document Moose type constraint creation for roles and classes + (actually fixed in 1.001000) + 1.001000 - 2013-03-16 - has will refuse to overwrite locally defined subs with generated accessors. diff --git a/lib/Moo.pm b/lib/Moo.pm index 3711a68..2904243 100644 --- a/lib/Moo.pm +++ b/lib/Moo.pm @@ -281,6 +281,10 @@ metaclasses for your L and L packages, so you should be able to use them in L code without anybody ever noticing you aren't using L everywhere. +L will also create L for +classes and roles, so that C<< isa => 'MyClass' >> and C<< isa => 'MyRole' >> +work the same as for L classes and roles. + Extending a L class or consuming a L will also work. So will extending a L class or consuming a L - but note @@ -467,6 +471,9 @@ one should do die "$_[0] is not a number!" unless looks_like_number $_[0] }, +Note that the return value is ignored, only whether the sub lives or +dies matters. + L Since L does B run the C check before C if a coercion