X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?p=gitmo%2FMouse.git;a=blobdiff_plain;f=lib%2FMouse%2FMeta%2FClass.pm;h=08bb9d33a21ba7bf51dc653676829293d3ae5f69;hp=20605ad079f76e55e87fcf729abbce7efa4666bd;hb=32490a728e1a7ec2ea29be2b87a7ed39a6e8f496;hpb=ecb77ca40583d35617313267443dfc4970c3599a diff --git a/lib/Mouse/Meta/Class.pm b/lib/Mouse/Meta/Class.pm index 20605ad..08bb9d3 100644 --- a/lib/Mouse/Meta/Class.pm +++ b/lib/Mouse/Meta/Class.pm @@ -226,14 +226,22 @@ sub clone_instance { return $class->clone_object($instance, %params); } -sub make_immutable { - my $self = shift; - my %args = ( + +sub immutable_options { + my ( $self, @args ) = @_; + + return ( inline_constructor => 1, inline_destructor => 1, constructor_name => 'new', - @_, + @args, ); +} + + +sub make_immutable { + my $self = shift; + my %args = $self->immutable_options(@_); $self->{is_immutable}++; @@ -256,7 +264,11 @@ sub make_immutable { return 1; } -sub make_mutable { not_supported } +sub make_mutable { + my($self) = @_; + $self->{is_immutable} = 0; + return; +} sub is_immutable { $_[0]->{is_immutable} } sub is_mutable { !$_[0]->{is_immutable} } @@ -450,7 +462,7 @@ Mouse::Meta::Class - The Mouse class metaclass =head1 VERSION -This document describes Mouse version 0.40_07 +This document describes Mouse version 0.44 =head1 METHODS