X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FClass%2FMOP%2FMethod.pm;h=3cae994f62908b5a5acd91cd59ebe43a60e08d26;hb=88d1bc8cdcdc1ce028bad2bbc2c6bb718ee0dac9;hp=4581498a165bb190f2e6fe1b3949247da76b6ae9;hpb=25a5f083d2d06a7823822e3a0c66baad3377d75b;p=gitmo%2FClass-MOP.git diff --git a/lib/Class/MOP/Method.pm b/lib/Class/MOP/Method.pm index 4581498..3cae994 100644 --- a/lib/Class/MOP/Method.pm +++ b/lib/Class/MOP/Method.pm @@ -7,7 +7,7 @@ use warnings; use Carp 'confess'; use Scalar::Util 'weaken'; -our $VERSION = '0.71'; +our $VERSION = '0.78'; $VERSION = eval $VERSION; our $AUTHORITY = 'cpan:STEVAN'; @@ -43,7 +43,7 @@ sub wrap { ($params{package_name} && $params{name}) || confess "You must supply the package_name and name parameters $UPGRADE_ERROR_TEXT"; - my $self = (ref($class) || $class)->_new(\%params); + my $self = $class->_new(\%params); weaken($self->{associated_metaclass}) if $self->{associated_metaclass}; @@ -64,8 +64,6 @@ sub _new { ## accessors -sub body { (shift)->{'body'} } - sub associated_metaclass { shift->{'associated_metaclass'} } sub attach_to_class { @@ -79,10 +77,6 @@ sub detach_from_class { delete $self->{associated_metaclass}; } -sub package_name { (shift)->{'package_name'} } - -sub name { (shift)->{'name'} } - sub fully_qualified_name { my $self = shift; $self->package_name . '::' . $self->name; @@ -168,10 +162,8 @@ to this class. =item B This is the basic constructor, it returns a B -instance which wraps the given C<$code> reference. You can also -set the C and C attributes using the C<%params>. -If these are not set, then thier accessors will attempt to figure -it out using the C function. +instance which wraps the given C<$code> reference. You must also set +the C and C attributes in C<%params>. =item B @@ -268,7 +260,7 @@ Stevan Little Estevan@iinteractive.comE =head1 COPYRIGHT AND LICENSE -Copyright 2006-2008 by Infinity Interactive, Inc. +Copyright 2006-2009 by Infinity Interactive, Inc. L