You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
You could use https://metacpan.org/pod/With::Roles to apply roles as it keeps track of this within its own usage. Unfortunately it's not a feature of Role::Tiny itself so it would depend on using the same Role::Tiny wrapper to apply every role.
Steps to reproduce the behavior
This isn't a bug because it's not doing something contrary to documentation, but seems it could be an improvement.
Expected behavior
I would think it would be ideal for
with_roles
to detect the role has already been added and skip it.Actual behavior
Currently
with_roles
adds the role even though it's already been added.Furthermore, using the shortcut is even more bizarre:
The text was updated successfully, but these errors were encountered: