bump version so Moose has something to depend on
[gitmo/Class-MOP.git] / lib / Class / MOP / Class.pm
index 834c007..7a6f039 100644 (file)
@@ -11,7 +11,7 @@ use Class::MOP::Method::Wrapped;
 use Carp         'confess';
 use Scalar::Util 'blessed', 'weaken';
 
-our $VERSION   = '0.78';
+our $VERSION   = '0.78_02';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -975,18 +975,31 @@ sub is_immutable { 0 }
 sub immutable_transformer { $_[0]->{immutable_transformer} }
 sub _set_immutable_transformer { $_[0]->{immutable_transformer} = $_[1] }
 
+sub make_immutable {
+    my $self = shift;
+
+    return if $self->is_immutable;
+
+    my $transformer = $self->immutable_transformer
+        || $self->_make_immutable_transformer(@_);
+
+    $self->_set_immutable_transformer($transformer);
+
+    $transformer->make_metaclass_immutable;
+}
+
 {
     my %Default_Immutable_Options = (
         read_only   => [qw/superclasses/],
         cannot_call => [
-            qw/
+            qw(
                 add_method
                 alias_method
                 remove_method
                 add_attribute
                 remove_attribute
                 remove_package_symbol
-                /
+                )
         ],
         memoize => {
             class_precedence_list => 'ARRAY',
@@ -1019,22 +1032,19 @@ sub _set_immutable_transformer { $_[0]->{immutable_transformer} = $_[1] }
         },
     );
 
-    sub make_immutable {
-        my $self = shift;
-
-        return if $self->is_immutable;
-
-        my $transformer = $self->immutable_transformer
-            || Class::MOP::Immutable->new(
-            $self,
-            %Default_Immutable_Options,
-            @_
-            );
+    sub _default_immutable_transformer_options {
+        return %Default_Immutable_Options;
+    }
+}
 
-        $self->_set_immutable_transformer($transformer);
+sub _make_immutable_transformer {
+    my $self = shift;
 
-        $transformer->make_metaclass_immutable;
-    }
+    Class::MOP::Immutable->new(
+        $self,
+        $self->_default_immutable_transformer_options,
+        @_
+    );
 }
 
 sub make_mutable {
@@ -1091,11 +1101,11 @@ Class::MOP::Class - Class Meta Object
 
 =head1 DESCRIPTION
 
-This is the largest and most complex part of the Class::MOP
-meta-object protocol. It controls the introspection and manipulation
-of Perl 5 classes, and it can create them as well. The best way to
-understand what this module can do, is to read the documentation for
-each of its methods.
+The Class Protocol is the largest and most complex part of the
+Class::MOP meta-object protocol. It controls the introspection and
+manipulation of Perl 5 classes, and it can create them as well. The
+best way to understand what this module can do, is to read the
+documentation for each of its methods.
 
 =head1 INHERITANCE
 
@@ -1233,7 +1243,7 @@ instance's attributes.
 
 Returns the class name of the instance metaclass, see
 L<Class::MOP::Instance> for more information on the instance
-metaclasses.
+metaclass.
 
 =item B<< $metaclass->get_meta_instance >>
 
@@ -1398,6 +1408,17 @@ track the original source of any methods added from other classes
 Remove the named method from the class. This method returns the
 L<Class::MOP::Method> object for the method.
 
+=item B<< $metaclass->method_metaclass >>
+
+Returns the class name of the method metaclass, see
+L<Class::MOP::Method> for more information on the method metaclass.
+
+=item B<< $metaclass->wrapped_method_metaclass >>
+
+Returns the class name of the wrapped method metaclass, see
+L<Class::MOP::Method::Wrapped> for more information on the wrapped
+method metaclass.
+
 =back
 
 =head2 Attribute introspection and creation
@@ -1623,6 +1644,20 @@ The return value of the modifier is what will be seen by the caller.
 
 =back
 
+=head2 Introspection
+
+=over 4
+
+=item B<< Class::MOP::Class->meta >>
+
+This will return a L<Class::MOP::Class> instance for this class.
+
+It should also be noted that L<Class::MOP> will actually bootstrap
+this module by installing a number of attribute meta-objects into its
+metaclass.
+
+=back
+
 =head1 AUTHORS
 
 Stevan Little E<lt>stevan@iinteractive.comE<gt>