From: Dave Rolsky Date: Sat, 14 Feb 2009 15:07:06 +0000 (+0000) Subject: Tidy the constructor code X-Git-Tag: 0.77~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=27bbcf6c7d1c23e2e071f921d279d12bdd2fcaa4;p=gitmo%2FClass-MOP.git Tidy the constructor code --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index 41e751e..9a80985 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -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; }