Class::Accessor::Assert - Accessors which type-check
use Class::Accessor::Assert; __PACKAGE__->mk_accessors( qw( +foo bar=Some::Class baz ) );
This is a version of Class::Accessor which offers rudimentary type-checking and existence-checking of arguments to constructors and set accessors.
To specify that a member is mandatory in the constructor, prefix its name with a +. To specify that it needs to be of a certain class when setting that member, suffix =CLASSNAME. Unblessed reference types such as =HASH or =ARRAY are acceptable.
+
=CLASSNAME
=HASH
=ARRAY
Class::Accessor
Simon Cozens, <simon@simon-cozens.org>
Copyright 2003 by Simon Cozens
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Class::Accessor::Assert, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Class::Accessor::Assert
CPAN shell
perl -MCPAN -e shell install Class::Accessor::Assert
For more information on module installation, please visit the detailed CPAN module installation guide.