Simon Cozens > Class-Accessor-Assert-1.2 > Class::Accessor::Assert

Download:
Class-Accessor-Assert-1.2.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
Report a bug
Module Version: 1.2   Source  

NAME ^

Class::Accessor::Assert - Accessors which type-check

SYNOPSIS ^

  use Class::Accessor::Assert;
  __PACKAGE__->mk_accessors( qw( +foo bar=Some::Class baz ) );

DESCRIPTION ^

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.

SEE ALSO ^

Class::Accessor

AUTHOR ^

Simon Cozens, <simon@simon-cozens.org>

COPYRIGHT AND LICENSE ^

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.