use Scalar::Util 'blessed';
use B 'svref_2object';
-our $VERSION = '0.05';
+our $VERSION = '0.07';
+our $AUTHORITY = 'cpan:STEVAN';
use Moose::Meta::Class;
+use Moose::Meta::Role::Method;
use base 'Class::MOP::Module';
# this is an UGLY hack
sub get_method_map {
my $self = shift;
- $self->{'%:methods'} ||= {};
+ $self->{'%!methods'} ||= {};
$self->Moose::Meta::Class::get_method_map()
}
my $method = $other->get_method($required_method_name);
# check if it is an override or a generated accessor ..
(!$method->isa('Moose::Meta::Method::Overriden') &&
- !$method->isa('Class::MOP::Attribute::Accessor'))
+ !$method->isa('Class::MOP::Method::Accessor'))
|| confess "'" . $self->name . "' requires the method '$required_method_name' " .
"to be implemented by '" . $other->name . "', the method is only a method modifier";
# before/after/around methods are a little trickier
}
}
else {
- $other->add_attribute(
- $attribute_name,
- $self->get_attribute($attribute_name)
- );
+ # NOTE:
+ # this is kinda ugly ...
+ if ($other->isa('Moose::Meta::Class')) {
+ $other->_process_attribute(
+ $attribute_name,
+ %{$self->get_attribute($attribute_name)}
+ );
+ }
+ else {
+ $other->add_attribute(
+ $attribute_name,
+ $self->get_attribute($attribute_name)
+ );
+ }
}
}
}
return $combined;
}
-package Moose::Meta::Role::Method;
-
-use strict;
-use warnings;
-
-our $VERSION = '0.01';
-
-use base 'Class::MOP::Method';
-
1;
__END__
=head1 DESCRIPTION
-Moose's Roles are being actively developed, please see L<Moose::Role>
-for more information. For the most part, this has no user-serviceable
-parts inside. It's API is still subject to some change (although
+Please see L<Moose::Role> for more information about roles.
+For the most part, this has no user-serviceable parts inside
+this module. It's API is still subject to some change (although
probably not that much really).
=head1 METHODS
=head1 COPYRIGHT AND LICENSE
-Copyright 2006 by Infinity Interactive, Inc.
+Copyright 2006, 2007 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>