Moose::Util::TypeConstraints isn't really important here and I should have edited it out of the snippet. The important thing to understand is
i.e. required methods. This is how a role indicates that a class consuming it should have some extra behaviour that the role depends on. Taking this to an extreme you can even have a role that only has required method specifiers - this gives you something similar to the interface construct found in Java/C#/PHP.package Foo::Bar; use Moose::Role; requires 'foo'; requires 'bar';
And this latter type of role is what is intended to be used when you specify a role to the 'handles' clause.Does that make sense?