From: Stevan Little Date: Tue, 10 Jun 2008 03:55:05 +0000 (+0000) Subject: now uses *_package_symbol HASH ref versions X-Git-Tag: 0_55~122 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8371f6e1acd993fed622766a35637db06aacd915;p=gitmo%2FMoose.git now uses *_package_symbol HASH ref versions --- diff --git a/Changes b/Changes index 2b74acf..42243e9 100644 --- a/Changes +++ b/Changes @@ -19,6 +19,10 @@ Revision history for Perl extension Moose - switched usage of reftype to ref because it is much faster + * Moose::Meta::Role + - changing add_package_symbol to use the new + HASH ref form + * Moose::Object - fixed how DEMOLISHALL is called so that it can be overrided in subclasses (thanks to Sartak) diff --git a/lib/Moose/Meta/Role.pm b/lib/Moose/Meta/Role.pm index 5774648..95094eb 100644 --- a/lib/Moose/Meta/Role.pm +++ b/lib/Moose/Meta/Role.pm @@ -8,7 +8,7 @@ use metaclass; use Carp 'confess'; use Scalar::Util 'blessed'; -our $VERSION = '0.15'; +our $VERSION = '0.16'; our $AUTHORITY = 'cpan:STEVAN'; use Moose::Meta::Class; @@ -360,7 +360,10 @@ sub alias_method { ('CODE' eq ref($body)) || confess "Your code block must be a CODE reference"; - $self->add_package_symbol("&${method_name}" => $body); + $self->add_package_symbol( + { sigil => '&', type => 'CODE', name => $method_name }, + $body + ); } ## ------------------------------------------------------------------