use Scalar::Util 'blessed';
-our $VERSION = '0.90';
+our $VERSION = '1.25';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
}
my @composition_roles = map {
- $_->has_composition_class_roles
- ? @{ $_->composition_class_roles }
- : ()
+ $_->composition_class_roles
} @{ $params{roles} };
if (@composition_roles) {
roles => [ @composition_roles ],
cache => 1,
);
- $meta->add_method(meta => sub { $meta });
$class = $meta->name;
}
return keys %{ $self->_method_map };
}
+sub _get_local_methods {
+ my $self = shift;
+ return values %{ $self->_method_map };
+}
+
sub has_method {
my ($self, $method_name) = @_;
}
sub reinitialize {
- my ($class, $old_meta, @args) = @_;
- Moose->throw_error('Moose::Meta::Role::Composite instances can only be reinitialized from an existing metaclass instance')
- if !blessed $old_meta || !$old_meta->isa('Moose::Meta::Role::Composite');
- return $old_meta->meta->clone_object($old_meta, @args);
+ my ( $class, $old_meta, @args ) = @_;
+
+ Moose->throw_error(
+ 'Moose::Meta::Role::Composite instances can only be reinitialized from an existing metaclass instance'
+ )
+ if !blessed $old_meta
+ || !$old_meta->isa('Moose::Meta::Role::Composite');
+
+ my %existing_classes = map { $_ => $old_meta->$_() } qw(
+ application_role_summation_class
+ );
+
+ return $old_meta->meta->clone_object( $old_meta, %existing_classes, @args );
}
1;
=head1 BUGS
-All complex software has bugs lurking in it, and this module is no
-exception. If you find a bug please either email me, or add the bug
-to cpan-RT.
+See L<Moose/BUGS> for details on reporting bugs.
=head1 AUTHOR
=head1 COPYRIGHT AND LICENSE
-Copyright 2006-2009 by Infinity Interactive, Inc.
+Copyright 2006-2010 by Infinity Interactive, Inc.
L<http://www.iinteractive.com>