X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FMethod%2FAccessor.pm;h=3e966a70fcde2b21d15e20f0964de1c4668e5b07;hb=34147f49f7fa85afe801d684c3e25322e4a34f61;hp=f882ae5d943b059d2668103d72bb853037730af9;hpb=a9e38dc76d4270c7a3d4fabae8e0e2009f11b5bb;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Method/Accessor.pm b/lib/Class/MOP/Method/Accessor.pm index f882ae5..3e966a7 100644 --- a/lib/Class/MOP/Method/Accessor.pm +++ b/lib/Class/MOP/Method/Accessor.pm @@ -7,7 +7,8 @@ use warnings; use Carp 'confess'; use Scalar::Util 'blessed', 'weaken'; -our $VERSION = '0.65'; +our $VERSION = '0.71_01'; +$VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; use base 'Class::MOP::Method::Generated'; @@ -28,7 +29,7 @@ sub new { ($options{package_name} && $options{name}) || confess "You must supply the package_name and name parameters $Class::MOP::Method::UPGRADE_ERROR_TEXT"; - my $self = $class->_new(%options); + my $self = $class->_new(\%options); # we don't want this creating # a cycle in the code, if not @@ -41,11 +42,12 @@ sub new { } sub _new { - my ( $class, %options ) = @_; + my $class = shift; + my $options = @_ == 1 ? $_[0] : {@_}; - $options{is_inline} ||= 0; + $options->{is_inline} ||= 0; - return bless \%options, $class; + return bless $options, $class; } ## accessors @@ -199,7 +201,7 @@ Class::MOP::Method::Accessor - Method Meta Object for accessors accessor_type => 'reader', ); - $reader->body->($instance); # call the reader method + $reader->body->execute($instance); # call the reader method =head1 DESCRIPTION