From: Dave Rolsky Date: Fri, 23 Jan 2009 17:48:00 +0000 (+0000) Subject: add a delegation_metaclass method to MM::Attribute, rather than hard-coding a class... X-Git-Tag: 0.66~35 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bd1226e27c5c3f3134de4acd02eb08ae775af7f1;p=gitmo%2FMoose.git add a delegation_metaclass method to MM::Attribute, rather than hard-coding a class name --- diff --git a/Changes b/Changes index 286c550..750ed11 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,10 @@ Revision history for Perl extension Moose +0.66 + * Moose::Meta::Attribute + - Added a delegation_metaclass method to replace a hard-coded + use of Moose::Meta::Method::Delegation. (Dave Rolsky) + 0.65 Thu, January 22, 2008 * Moose and Moose::Meta::Method::Overridden - If an overridden method called super(), and then the diff --git a/lib/Moose/Meta/Attribute.pm b/lib/Moose/Meta/Attribute.pm index d5dc685..2c85617 100644 --- a/lib/Moose/Meta/Attribute.pm +++ b/lib/Moose/Meta/Attribute.pm @@ -705,6 +705,8 @@ sub _get_delegate_method_list { } } +sub delegation_metaclass { 'Moose::Meta::Method::Delegation' } + sub _make_delegation_method { my ( $self, $handle_name, $method_to_call ) = @_; @@ -713,7 +715,7 @@ sub _make_delegation_method { $method_body = $method_to_call if 'CODE' eq ref($method_to_call); - return Moose::Meta::Method::Delegation->new( + return $self->delegation_metaclass->new( name => $handle_name, package_name => $self->associated_class->name, attribute => $self, @@ -787,6 +789,8 @@ will behave just as L does. =item B +=item B + =item B =item B