debian man page for moosex::aliases

Query: moosex::aliases

OS: debian

Section: 3pm

Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar

MooseX::Aliases(3pm)					User Contributed Perl Documentation				      MooseX::Aliases(3pm)

NAME
MooseX::Aliases - easy aliasing of methods and attributes in Moose
VERSION
version 0.10
SYNOPSIS
package MyApp; use Moose; use MooseX::Aliases; has this => ( isa => 'Str', is => 'rw', alias => 'that', ); sub foo { my $self = shift; print $self->that } alias bar => 'foo'; my $o = MyApp->new(); $o->this('Hello World'); $o->bar; # prints 'Hello World' or package MyApp::Role; use Moose::Role; use MooseX::Aliases; has this => ( isa => 'Str', is => 'rw', alias => 'that', ); sub foo { my $self = shift; print $self->that } alias bar => 'foo';
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. You can create more than one alias at once by passing a listref: has ip_addr => ( alias => [ qw(ipAddr ip) ], );
FUNCTIONS
alias ALIAS METHODNAME Installs ALIAS as a method that is aliased to the method METHODNAME.
CAVEATS
The order of arguments for the "alias" method has changed (as of version 0.05). I think the new order makes more sense, and it will make future refactoring I have in mind easier. The old order still works (although it gives a deprecation warning), unless you were relying on being able to override an existing method with an alias - this will now override in the other direction. The old argument order will be removed in a future release.
BUGS
No known bugs. Please report any bugs through RT: email "bug-moosex-aliases at rt.cpan.org", or browse to http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooseX-Aliases <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=MooseX-Aliases>.
SEE ALSO
o Moose o Method::Alias
SUPPORT
You can find this documentation for this module with the perldoc command. perldoc MooseX::Aliases You can also look for information at: o AnnoCPAN: Annotated CPAN documentation http://annocpan.org/dist/MooseX-Aliases <http://annocpan.org/dist/MooseX-Aliases> o CPAN Ratings http://cpanratings.perl.org/d/MooseX-Aliases <http://cpanratings.perl.org/d/MooseX-Aliases> o RT: CPAN's request tracker http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-Aliases <http://rt.cpan.org/NoAuth/Bugs.html?Dist=MooseX-Aliases> o Search CPAN http://search.cpan.org/dist/MooseX-Aliases <http://search.cpan.org/dist/MooseX-Aliases>
AUTHORS
o Jesse Luehrs <doy at tozt dot net> o Chris Prather <chris@prather.org> o Justin Hunter <justin.d.hunter at gmail dot com>
COPYRIGHT AND LICENSE
This software is copyright (c) 2011 by Jesse Luehrs. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. perl v5.12.3 2011-04-29 MooseX::Aliases(3pm)
Related Man Pages
moosex::singleton5.18(3) - mojave
moosex::declare::syntax::keyword::role(3pm) - debian
moosex::has::sugar::minimal(3pm) - debian
moosex::nonmoose(3pm) - debian
moosex::role::timer(3pm) - debian
Similar Topics in the Unix Linux Community
Define Aliases to tail many logs
ALIAS
[Solved] Aliases in HP-UX
Alias physical location.
Command to show alias name for ipaddress