From: gfx Date: Sat, 10 Oct 2009 08:08:14 +0000 (+0900) Subject: Tidy X-Git-Tag: 0.37_06~18 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=c9a3c0ed389e30d9d176ab198ecfb766cce0aa3c;p=gitmo%2FMouse.git Tidy --- diff --git a/lib/Mouse.pm b/lib/Mouse.pm index 10998df..78d54ea 100644 --- a/lib/Mouse.pm +++ b/lib/Mouse.pm @@ -130,13 +130,10 @@ sub init_meta { my $class = $args{for_class} or confess("Cannot call init_meta without specifying a for_class"); + my $base_class = $args{base_class} || 'Mouse::Object'; my $metaclass = $args{metaclass} || 'Mouse::Meta::Class'; - # make a subtype for each Mouse class - Mouse::Util::TypeConstraints::class_type($class) - unless Mouse::Util::TypeConstraints::find_type_constraint($class); - my $meta = $metaclass->initialize($class); $meta->add_method(meta => sub{ @@ -146,6 +143,10 @@ sub init_meta { $meta->superclasses($base_class) unless $meta->superclasses; + # make a class type for each Mouse class + Mouse::Util::TypeConstraints::class_type($class) + unless Mouse::Util::TypeConstraints::find_type_constraint($class); + return $meta; }