in reply to Moose roles with extends

When Moose sees this:

has 'successor' => ( is => 'rw', isa => 'ChainOfResposibilityIf', );

If the ChainOfResposibilityIf role has not yet been loaded (use/require), Moose needs to make a snap decision about what kind of thing ChainOfResposibilityIf is. It needs to set up everything for the attribute straight away - it doesn't wait until you actully make use of the attribute.

Anyway, Moose guesses that it's a class. So later, when you assign to the attribute, it checks $value->isa('ChainOfResposibilityIf') (which fails) instead of $value->DOES('ChainOfResposibilityIf') (which would pass).

Three possible solutions. Any of them will do:

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name