MooseX::Attribute::Handles::Expand - Expands '*' in handle functions with the attribute name
version 0.0.3
package Foo; use Moose; use MooseX::Attribute::Handles::Expand; has [ qw/ bar baz / ] => ( traits => [ 'Array' ], default => sub { [] }, handles => { 'size_*' => 'count', }, ); my $foo = Foo->new; ...; print $foo->size_bar; print $foo->size_baz;
Grooms the name of delegated methods in the handles and expands all instances of * into the attribute name.
*
Yanick Champoux <yanick@babyl.dyndns.org>
This software is copyright (c) 2016 by Yanick Champoux.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install Moose::Meta::Attribute::Custom::Trait::Handles::Expand, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Moose::Meta::Attribute::Custom::Trait::Handles::Expand
CPAN shell
perl -MCPAN -e shell install Moose::Meta::Attribute::Custom::Trait::Handles::Expand
For more information on module installation, please visit the detailed CPAN module installation guide.