The method keyword has a default invocant called $self, but it does not have a type constraint, so can equally be used for class or object methods. The objectmethod keyword works the same, but does define a type constraint for $self, requiring it to be a blessed object. The classmethod keyword defines an invocant called $class which has a type constraint requiring it to be a string.

In any case, it is perfectly possible to define your own name and type constraint for the invocant:

The fresh trait will throw an exception if the method you are defining already exists in the inheritance hierarchy for this class. The idea of this trait is to increase safety when subclassing.

Suppose a future release of your parent class adds a new method with the same name as one of yours, but differing functionality; your method would normally override the one in the parent class. With the fresh trait, an exception would be thrown, giving you opportunity to resolve the conflict.

The override trait does the opposite; it will throw an exception if the method being defined does not already exist.

This is more or less what you'd expect from the method body you'd write with sub, however the lexical variables for parameters are pre-declared and pre-populated, and invocants have been shifted off @_.