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
I am enjoying using Class::Tiny! I would like to add type constraints to my setters to enforce preconditions early. It is easy, but repetitive, to copy the sample accessor from the C::T POD and add a constraint check. Is there already a module or C::T feature that does that? I looked on CPAN but couldn't find one. For example, Class::Tiny::Antlers does not provide isa.
If there is an existing way or module, would you be willing to update the C::T POD to reference it? If not, I will write Class::Tiny::ConstrainedAccessor and then send a PR for the POD. Thanks for considering this question and request!
The text was updated successfully, but these errors were encountered:
I am enjoying using Class::Tiny! I would like to add type constraints to my setters to enforce preconditions early. It is easy, but repetitive, to copy the sample accessor from the C::T POD and add a constraint check. Is there already a module or C::T feature that does that? I looked on CPAN but couldn't find one. For example, Class::Tiny::Antlers does not provide
isa
.If there is an existing way or module, would you be willing to update the C::T POD to reference it? If not, I will write
Class::Tiny::ConstrainedAccessor
and then send a PR for the POD. Thanks for considering this question and request!The text was updated successfully, but these errors were encountered: