class which isa Moose class with a metaclass role applied (t0m)
* Moose::Meta::Role
- - Add a role-combination hook, role_for_combination, for the
+ - Add a role-combination hook, _role_for_combination, for the
benefit of MooseX::Role::Parameterized (Sartak)
0.77 Sat, May 2, 2009
my ($role_name, $params) = @{ splice @role_specs, 0, 1 };
my $requested_role = Class::MOP::class_of($role_name);
- my $actual_role = $requested_role->role_for_combination($params);
+ my $actual_role = $requested_role->_role_for_combination($params);
push @roles => $actual_role;
next unless defined $params;
return $c;
}
-sub role_for_combination {
+sub _role_for_combination {
my ($self, $params) = @_;
return $self;
}
The return value is a new L<Moose::Meta::Role::Composite> that
represents the combined roles.
-=item B<< Moose::Meta::Role->role_for_combination($options) >>
-
-This is a hook for incorporating role-combination parameters. This
-method returns a role meta-object (by default the invocant role) to be
-used for the combination.
-
=item B<< Moose::Meta::Role->create($name, %options) >>
This method is identical to the L<Moose::Meta::Class> C<create>
use Moose;
BEGIN { extends 'Moose::Meta::Role' };
- sub role_for_combination {
+ sub _role_for_combination {
my ($self, $opts) = @_;
$OPTS = $opts;
return My::Singleton::Role->meta;