Tidy the constructor code
Dave Rolsky [Sat, 14 Feb 2009 15:07:06 +0000 (15:07 +0000)]
lib/Class/MOP/Class.pm

index 41e751e..9a80985 100644 (file)
@@ -103,7 +103,7 @@ sub _new {
 
     bless {
         # inherited from Class::MOP::Package
-        'package'                     => $options->{package},
+        'package' => $options->{package},
 
         # NOTE:
         # since the following attributes will
@@ -113,19 +113,25 @@ sub _new {
         # listed here for reference, because they
         # should not actually have a value associated
         # with the slot.
-        'namespace'                   => \undef,
+        'namespace' => \undef,
+
         # inherited from Class::MOP::Module
-        'version'                     => \undef,
-        'authority'                   => \undef,
+        'version'   => \undef,
+        'authority' => \undef,
+
         # defined in Class::MOP::Class
-        'superclasses'                => \undef,
-
-        'methods'                     => {},
-        'attributes'                  => {},
-        'attribute_metaclass'         => $options->{'attribute_metaclass'}      || 'Class::MOP::Attribute',
-        'method_metaclass'            => $options->{'method_metaclass'}         || 'Class::MOP::Method',
-        'wrapped_method_metaclass'    => $options->{'wrapped_method_metaclass'} || 'Class::MOP::Method::Wrapped',
-        'instance_metaclass'          => $options->{'instance_metaclass'}       || 'Class::MOP::Instance',
+        'superclasses' => \undef,
+
+        'methods'             => {},
+        'attributes'          => {},
+        'attribute_metaclass' => $options->{'attribute_metaclass'}
+            || 'Class::MOP::Attribute',
+        'method_metaclass' => $options->{'method_metaclass'}
+            || 'Class::MOP::Method',
+        'wrapped_method_metaclass' => $options->{'wrapped_method_metaclass'}
+            || 'Class::MOP::Method::Wrapped',
+        'instance_metaclass' => $options->{'instance_metaclass'}
+            || 'Class::MOP::Instance',
     }, $class;
 }