perltidy all the AttributeHelpers code
[gitmo/Moose.git] / lib / Moose / AttributeHelpers / Trait / Collection / Bag.pm
index 5cd36c7..723d716 100644 (file)
@@ -3,7 +3,7 @@ package Moose::AttributeHelpers::Trait::Collection::Bag;
 use Moose::Role;
 use Moose::Util::TypeConstraints;
 
-our $VERSION   = '0.19';
+our $VERSION   = '0.84';
 $VERSION = eval $VERSION;
 our $AUTHORITY = 'cpan:STEVAN';
 
@@ -22,15 +22,16 @@ subtype 'Bag' => as 'HashRef[Int]';
 
 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;
@@ -63,12 +64,12 @@ Moose::AttributeHelpers::Collection::Bag
       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',
       }
   );
 
@@ -90,7 +91,7 @@ for more details.
 
 =item B<helper_type>
 
-=item B<process_options_for_provides>
+=item B<process_options_for_handles>
 
 =back