X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FMethod%2FConstructor.pm;h=6f9d2214a927ffdb42aec63042536664debbea20;hb=8683db0e09d4b53db67d19f36810e4070e264d2d;hp=e3cf9c1e6ac761743f7a1db358133a877fb07937;hpb=809a26fc6ca09ac0e6eb72a226eb5813e579482b;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Method/Constructor.pm b/lib/Class/MOP/Method/Constructor.pm index e3cf9c1..6f9d221 100644 --- a/lib/Class/MOP/Method/Constructor.pm +++ b/lib/Class/MOP/Method/Constructor.pm @@ -7,7 +7,7 @@ use warnings; use Carp 'confess'; use Scalar::Util 'blessed', 'weaken', 'looks_like_number'; -our $VERSION = '0.60'; +our $VERSION = '0.65'; our $AUTHORITY = 'cpan:STEVAN'; use base 'Class::MOP::Method::Generated'; @@ -25,19 +25,19 @@ sub new { my $self = bless { # from our superclass - '&!body' => undef, - '$!package_name' => $options{package_name}, - '$!name' => $options{name}, + 'body' => undef, + 'package_name' => $options{package_name}, + 'name' => $options{name}, # specific to this subclass - '%!options' => $options{options} || {}, - '$!associated_metaclass' => $options{metaclass}, - '$!is_inline' => ($options{is_inline} || 0), + 'options' => $options{options} || {}, + 'associated_metaclass' => $options{metaclass}, + 'is_inline' => ($options{is_inline} || 0), } => $class; # we don't want this creating # a cycle in the code, if not # needed - weaken($self->{'$!associated_metaclass'}); + weaken($self->{'associated_metaclass'}); $self->initialize_body; @@ -46,19 +46,19 @@ sub new { ## accessors -sub options { (shift)->{'%!options'} } -sub associated_metaclass { (shift)->{'$!associated_metaclass'} } +sub options { (shift)->{'options'} } +sub associated_metaclass { (shift)->{'associated_metaclass'} } ## cached values ... sub meta_instance { my $self = shift; - $self->{'$!meta_instance'} ||= $self->associated_metaclass->get_meta_instance; + $self->{'meta_instance'} ||= $self->associated_metaclass->get_meta_instance; } sub attributes { my $self = shift; - $self->{'@!attributes'} ||= [ $self->associated_metaclass->compute_all_applicable_attributes ] + $self->{'attributes'} ||= [ $self->associated_metaclass->compute_all_applicable_attributes ] } ## method @@ -69,7 +69,7 @@ sub initialize_body { $method_name .= '_inline' if $self->is_inline; - $self->{'&!body'} = $self->$method_name; + $self->{'body'} = $self->$method_name; } sub generate_constructor_method { @@ -160,8 +160,6 @@ sub _generate_slot_initializer { 1; -1; - __END__ =pod