use Moose::Role;
use Moose::Util::TypeConstraints;
-our $VERSION = '0.19';
+our $VERSION = '0.84';
$VERSION = eval $VERSION;
our $AUTHORITY = 'cpan:STEVAN';
sub helper_type { 'Bag' }
-before 'process_options_for_provides' => sub {
- my ($self, $options, $name) = @_;
+before 'process_options_for_handles' => sub {
+ my ( $self, $options, $name ) = @_;
# Set some default attribute options here unless already defined
- if ((my $type = $self->helper_type) && !exists $options->{isa}){
+ if ( ( my $type = $self->helper_type ) && !exists $options->{isa} ) {
$options->{isa} = $type;
}
- $options->{default} = sub { +{} } unless exists $options->{default};
+ $options->{default} = sub { +{} }
+ unless exists $options->{default};
};
no Moose::Role;
metaclass => 'Collection::Bag',
is => 'ro',
isa => 'Bag', # optional ... as is defalt
- provides => {
- 'add' => 'add_word',
- 'get' => 'get_count_for',
- 'empty' => 'has_any_words',
- 'count' => 'num_words',
- 'delete' => 'delete_word',
+ handles => {
+ add_word => 'add',
+ get_count_for => 'get',
+ has_any_words => 'empty',
+ num_words => 'count',
+ delete_word => 'delete',
}
);
=item B<helper_type>
-=item B<process_options_for_provides>
+=item B<process_options_for_handles>
=back