So the behavior is at least consistent albeit not adequately documented.use warnings; use strict; use feature qw{ say }; { package MyRole; use Moose::Role; sub where { 'Role' } sub role { 'yes' } } { package MyClass; sub new { bless {}, shift } sub where { 'Class' } } { package MyHeir; use Moose; extends 'MyClass'; with 'MyRole'; } my $h = 'MyHeir'->new; say $h->$_ for qw( where role ); __END__ Prints: Role yes
In reply to Re: Role Composition versus Inheritance
by Arunbear
in thread Role Composition versus Inheritance
by choroba
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |