From: Dave Rolsky Date: Thu, 23 Apr 2009 19:26:54 +0000 (-0500) Subject: Make immutable_metaclass private and move it so it comes after where it is used. X-Git-Tag: 0.82_01~5 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f5433c0cde5348d0530895517037be49609dafea;p=gitmo%2FClass-MOP.git Make immutable_metaclass private and move it so it comes after where it is used. --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index 41ee57e..0992306 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -1029,7 +1029,15 @@ sub make_mutable { } } -sub immutable_metaclass { +sub _rebless_as_immutable { + my ( $self, @args ) = @_; + + $self->{__immutable}{original_class} = ref $self; + + bless $self => $self->_immutable_metaclass(@args); +} + +sub _immutable_metaclass { my ( $self, %args ) = @_; if ( my $class = $args{immutable_metaclass} ) { @@ -1076,14 +1084,6 @@ sub immutable_metaclass { } } -sub _rebless_as_immutable { - my ( $self, @args ) = @_; - - $self->{__immutable}{original_class} = ref $self; - - bless $self => $self->immutable_metaclass(@args); -} - sub _remove_inlined_code { my $self = shift;