I wonder if anyone else would find this useful.
__PACKAGE__->accessor_validation(I also can't think of a good name to call it. Any ideas? For now I'm just using it in a project with a project specific package name. One suggestion was Class::Validate, but that removes the accessor bit. Class::Accesssor::Validate removes the params bit, but might be better.
name => {
validate => 'pos',
spec => [
{ type => SCALAR },
],
},
.... => { ... },
);
__PACKAGE__->mk_accessors( qw[name ... ] );
Posted from caseywest.com, comment here.