die "No roles supplied!" unless @roles;
- my $new_name = join('+', $superclass, my $compose_name = join '+', @roles);
+ my $new_name = join(
+ '__WITH__', $superclass, my $compose_name = join '__AND__', @roles
+ );
+
return $new_name if $COMPOSED{class}{$new_name};
foreach my $role (@roles) {
die "${role} is not a Role::Tiny" unless my $info = $INFO{$role};
}
- if ($] > 5.010) {
+ if ($] >= 5.010) {
require mro;
} else {
require MRO::Compat;
If a method that the role L</requires> to be implemented is not implemented,
role application will fail loudly.
+=back
+
Unlike L<Class::C3>, where the B<last> class inherited from "wins," role
composition is the other way around, where first wins. In a more complete
system (see L<Moose>) roles are checked to see if they clash. The goal of this
See L<< Class::Method::Modifiers/after method(s) => sub { ... } >> for full
documentation.
+=head1 AUTHORS
+
+See L<Moo> for authors.
+
+=head1 COPYRIGHT AND LICENSE
+
+See L<Moo> for the copyright and license.
+
+=cut