From: Shawn M Moore Date: Sun, 20 Jul 2008 19:58:39 +0000 (+0000) Subject: Add a stub make_immutable for some Moose compat X-Git-Tag: 0.19~234 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=60e2164ad9cf3ad7605fda95d3fa5be750e6d720;p=gitmo%2FMouse.git Add a stub make_immutable for some Moose compat --- diff --git a/Changes b/Changes index d83d60b..70af360 100644 --- a/Changes +++ b/Changes @@ -4,6 +4,10 @@ Revision history for Mouse * Mouse - updated trigger doc (thanks perigrin) + * Mouse::Meta::Class + - add a make_immutable method which does nothing(!), for even more + Moose compat (nothingmuch's idea) + 0.05 Thu Jul 17 01:53:20 2008 * Mouse::Role Mouse::Meta::Role diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 2107011..0e3c34a 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -125,6 +125,7 @@ sub clone_instance { } +sub make_immutable {} 1; diff --git a/t/201-squirrel.t b/t/201-squirrel.t index 198af9e..8a37731 100644 --- a/t/201-squirrel.t +++ b/t/201-squirrel.t @@ -56,12 +56,15 @@ eval " use Squirrel; has bar => (is => 'rw'); + __PACKAGE__->meta->make_immutable; package Bar; use Squirrel; has bar => (is => 'rw'); + __PACKAGE__->meta->make_immutable; "; +warn $@ if $@; is(blessed(Foo->meta->get_attribute('foo')), 'Mouse::Meta::Attribute'); is(blessed(Foo->meta->get_attribute('bar')), 'Mouse::Meta::Attribute', 'Squirrel is consistent if Moose was loaded between imports');