Fey::Role::MakesAliasObjects - A role for objects with separate alias objects
version 0.43
package My::Thing; use Moose 2.1200; with 'Fey::Role::MakesAliasObjects' => { alias_class => 'My::Alias', self_param => 'thing', name_param => 'alias_name', };
This role adds a "make an alias object" method to a class. This is for things like tables and columns, which can have aliases.
The name of the class whose new() is called by the alias() method (see below). Required.
new()
alias()
The name of the parameter to pass $self to the alias_class' new() method as. Required.
$self
alias_class
The name of the parameter to alias() that passing a single string is assumed to be. Defaults to alias_name.
alias_name
my $alias = $obj->alias(alias_name => 'an_alias', %other_params); my $alias = $obj->alias('an_alias');
Create a new alias for this object. If a single parameter is provided, it is assumed to be whatever the name_param parameter specifies (see above).
name_param
See Fey for details on how to report bugs.
Dave Rolsky <autarch@urth.org>
This software is Copyright (c) 2011 - 2015 by Dave Rolsky.
This is free software, licensed under:
The Artistic License 2.0 (GPL Compatible)
To install Fey, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Fey
CPAN shell
perl -MCPAN -e shell install Fey
For more information on module installation, please visit the detailed CPAN module installation guide.