MooseX::Meta::Attribute::Lvalue - shim for backwards compatibility
package MyThing; use Moose; with 'MooseX::Meta::Attribute::Lvalue'; # Instead of: use MooseX::LvalueAttribute; has name => ( traits => ['Lvalue'], is => 'rw', isa => 'Str', required => 1, ); has size => ( traits => ['Lvalue'], is => 'rw', isa => 'Int', default => 0, ); package main; my $thing = MyThing->new(name => 'Foo'); $thing->name = "Bar"; print $thing->name; # Bar $thing->size++; print $thing->size; # 1
This is a small Moose role that doesn't alter your class at all. It just loads MooseX::LvalueAttribute for you.
There's no reason to use this role for your classes, but it was required by earlier versions of this software, so is retained for backwards compatibility.
Please report any bugs to http://rt.cpan.org/Dist/Display.html?Queue=MooseX-LvalueAttribute.
Toby Inkster <email@example.com>.
Based on work by Christopher Brown,
<cbrown at opendatagroup.com>
COPYRIGHT AND LICENCE
This software is copyright (c) 2013 by Toby Inkster; 2008 by Christopher Brown.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
DISCLAIMER OF WARRANTIES
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.