From: Stevan Little Date: Tue, 11 Mar 2008 16:58:01 +0000 (+0000) Subject: cleanin up a bit, and adding changes X-Git-Tag: 0_55~287 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=48045612e6d909058e294a260be0b1dda0f9dbdd;p=gitmo%2FMoose.git cleanin up a bit, and adding changes --- diff --git a/Changes b/Changes index fabb0ff..ff7482c 100644 --- a/Changes +++ b/Changes @@ -13,6 +13,10 @@ Revision history for Perl extension Moose - fixing the 'apply_all_roles' keyword so that it will not trigger Ovid's bug (http://use.perl.org/~Ovid/journal/35763) + * Moose::Meta::Class + - added ->create method which now supports roles (thanks to jrockway) + - added tests for this + * Moose::Util::TypeConstraints - it is now possible to make anon-enums by passing 'enum' an ARRAY ref instead of the $name => @values. Everything else diff --git a/lib/Moose/Meta/Class.pm b/lib/Moose/Meta/Class.pm index 86ba9f8..03f63d8 100644 --- a/lib/Moose/Meta/Class.pm +++ b/lib/Moose/Meta/Class.pm @@ -9,7 +9,7 @@ use Class::MOP; use Carp 'confess'; use Scalar::Util 'weaken', 'blessed', 'reftype'; -our $VERSION = '0.20'; +our $VERSION = '0.21'; our $AUTHORITY = 'cpan:STEVAN'; use Moose::Meta::Method::Overriden; @@ -40,7 +40,7 @@ sub create { my $class = $self->SUPER::create($package_name, %options); - if(exists $options{roles} && defined $options{roles}){ + if (exists $options{roles}) { Moose::Util::apply_all_roles($class, @{$options{roles}}); }