X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMouse.pm;h=ba791a96aeefee869acdfc316b5eccf0dadd402f;hb=ea6dc3a5b84bb831e5c750e9fc402050d83c6135;hp=34be99305b3abdc0e714e2dad22fb2bec9945718;hpb=aec5563ba96db71bec4c301c811c4888d52258a6;p=gitmo%2FMouse.git diff --git a/lib/Mouse.pm b/lib/Mouse.pm index 34be993..ba791a9 100644 --- a/lib/Mouse.pm +++ b/lib/Mouse.pm @@ -115,6 +115,9 @@ sub import { $meta->superclasses('Mouse::Object') unless $meta->superclasses; + # make a subtype for each Mouse class + class_type($caller) unless find_type_constraint($caller); + no strict 'refs'; no warnings 'redefine'; *{$caller.'::meta'} = sub { $meta }; @@ -427,6 +430,8 @@ tokuhirom Yappo +wu-lee + with plenty of code borrowed from L and L =head1 BUGS