X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse.pm;h=03265323c827a89ad5d168c3db595ed440ea1141;hp=03b77ed44d6fbad44a9cc54d932a4f019fb5db19;hb=6a97bbdad44391f2a587165cb81fcf8aedc642ac;hpb=fc44e30e64cdf372dbbc22ad3f7f3a477eef5c51 diff --git a/lib/Mouse.pm b/lib/Mouse.pm index 03b77ed..0326532 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_04'; -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,18 +143,25 @@ 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; } 1; - __END__ =head1 NAME Mouse - Moose minus the antlers +=head1 VERSION + +This document describes Mouse version 0.40_04 + =head1 SYNOPSIS package Point; @@ -198,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 @@ -220,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 @@ -395,6 +400,8 @@ Perl 5.6.2 or later. =head1 SEE ALSO +L + L L