X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse.pm;h=bff08e5594e8a87ef9dd7a78b60f46825ffd832b;hp=a12c4a94e9d0198e03706ec36583326f8060a62e;hb=2b68f76d78d96325821e9a6360c3639f8c5637df;hpb=0126c27c413cb63f67e66e09b0fdfeb92117503a diff --git a/lib/Mouse.pm b/lib/Mouse.pm index a12c4a9..bff08e5 100644 --- a/lib/Mouse.pm +++ b/lib/Mouse.pm @@ -3,9 +3,9 @@ use 5.006_002; use Mouse::Exporter; # enables strict and warnings -our $VERSION = '0.37_04'; +our $VERSION = '0.40_03'; -use Carp qw(confess); +use Carp qw(confess); use Scalar::Util qw(blessed); use Mouse::Util qw(load_class is_class_loaded get_code_package not_supported); @@ -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; } @@ -157,6 +158,10 @@ __END__ Mouse - Moose minus the antlers +=head1 VERSION + +This document describes Mouse version 0.40_03 + =head1 SYNOPSIS package Point; @@ -197,9 +202,8 @@ latter, if possible. Mouse aims to alleviate this by providing a subset of Moose's functionality, faster. -We're also going as light on dependencies as possible. -L or L is required -if you want support for L, L, and L. +We're also going as light on dependencies as possible. Mouse currently has +B except for testing modules. =head2 MOOSE COMPATIBILITY @@ -219,6 +223,8 @@ Moose, if you run into weird errors, it would be worth running: to see if the bug is caused by Mouse. Moose's diagnostics and validation are also much better. +See also L for compatibility and incompatibility with Moose. + =head2 MouseX Please don't copy MooseX code to MouseX. If you need extensions, you really @@ -394,6 +400,8 @@ Perl 5.6.2 or later. =head1 SEE ALSO +L + L L