DESCRIPTION

The MooseX::Aliases module will allow you to quickly alias methods in Moose. It provides an alias parameter for has() to generate aliased accessors as well as the standard ones. Attributes can also be initialized in the constructor via their aliased names.

In the example above, Child1 overrides the method using its original name (method1). As a result, calling method1 or method2 returns "B". Child2 overrides the method using its alias (method2). As a result, calling method2 returns "C", but calling method1 falls through to the parent class, so returns "A".

In the example above, Class1's around modifier modifies the method using its original name. As a result, both method1 and method2 return "B". Class2's around modifier modifies the alias, so method2 returns "B", but method1 continues to return "A".