NAME

MooX::AliasedAttributes - Make aliases to your attributes, and methods.

SYNOPSIS

package Foo;
use Moo;
use MooX::AliasedAttributes;

has color => (
    is    => 'rw',
    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 name. Note that if you set either writer or reader that this has no affect onthe alias, the alias will still point at the attribute name.

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.