MooseX::SemiAffordanceAccessor - Name your accessors foo() and set_foo()
use MooseX::SemiAffordanceAccessor; use Moose; # make some attributes
This module does not provide any methods. Simply loading it changes the default naming policy for the loading class so that accessors are separated into get and set methods. The get methods have the same name as the accessor, while set methods are prefixed with "set_".
If you define an attribute with a leading underscore, then the set method will start with "_set_".
If you explicitly set a "reader" or "writer" name when creating an attribute, then that attribute's naming scheme is left unchanged.
The name "semi-affordance" comes from David Wheeler's Class::Meta module.
Dave Rolsky, <autarch@urth.org>
<autarch@urth.org>
Please report any bugs or feature requests to bug-moosex-semiaffordanceaccessor@rt.cpan.org, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-moosex-semiaffordanceaccessor@rt.cpan.org
Copyright 2007-2008 Dave Rolsky, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install MooseX::SemiAffordanceAccessor, copy and paste the appropriate command in to your terminal.
cpanm
cpanm MooseX::SemiAffordanceAccessor
CPAN shell
perl -MCPAN -e shell install MooseX::SemiAffordanceAccessor
For more information on module installation, please visit the detailed CPAN module installation guide.