NAME

MooseX::MutatorAttributes - add a quick set method that returns self

VERSION

Version 0.01

SYNOPSIS

I got tired of doing this:

$obj->attr1($value1);
$obj->attr2($value2);
$obj->method_that_uses_attr;

What I wanted to do was:

use MooseX::MutatorAttributes;
$obj->set( attr1 => $value1, attr2 => $value2 )->method_that_uses_attr;

Now I can, and so can you.

METHOD

set

$self->set( HASH );

Set takes a hash, keys are expected to be attributes, if they are not then we Carp::cluck. If a key is an acceptable attribute then we attempt to set with $value.

AUTHOR

ben hengst, <notbenh at cpan.org>

BUGS

Please report any bugs or feature requests to bug-moosex-setter at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooseX-MutatorAttributes. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc MooseX::MutatorAttributes

You can also look for information at:

ACKNOWLEDGEMENTS

COPYRIGHT & LICENSE

Copyright 2008 ben hengst, all rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.