Juerd writes:
> (And write classes ucfirst, please)
>
> > return $self but role {
>
> does role { ... }
Nope, Aaron was right here, since you're not trying to mutate $self;
you're just trying to return a new $self with other capabilities.
> > It certainly seems very attractive, but I'm not sure if roles can be
> > anonymous and/or closures.
>
> They can. But I think what you wrote is rather unnecessarily complex.
Perhaps for this case, but I could see situations where this technique
could be valuable.
Luke