NAME
MooX::AliasedAttributes - Make aliases to your attributes, and methods.
SYNOPSIS
package Foo;
use Moo;
use MooX::AliasedAttributes;
has color => (
is => 'ro',
alias => 'colour',
);
alias bar => 'color';
my $foo = Foo->new( color=>'red' );
print $foo->colour(); # red
$foo->colour('green');
print $foo->color(); # green
print $foo->bar(); # green
DESCRIPTION
Aliases a method to an attribute's writer
(which is usually the same name as the attribute itself).
This module came to life to help port Moose code using MooseX::Aliases to Moo. In order to port you existing code from Moose to Moo you should just be able to replace use MooseX::Aliases;
with use MooX::AliasedAttributes;
.
AUTHOR
Aran Clary Deltac <bluefeet@gmail.com>
LICENSE
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.