Hmm. I think I did something odd in here...
[gitmo/MooseX-AttributeHelpers.git] / lib / MooseX / AttributeHelpers / Collection / Hash.pm
index eddb3e4..c2d6acb 100644 (file)
@@ -1,27 +1,21 @@
 
 package MooseX::AttributeHelpers::Collection::Hash;
 use Moose;
+use MooseX::AttributeHelpers::Sugar;
+
+extends 'MooseX::AttributeHelpers::Collection';
 
 our $VERSION   = '0.02';
 our $AUTHORITY = 'cpan:STEVAN';
 
-use MooseX::AttributeHelpers::MethodProvider::Hash;
-
-extends 'MooseX::AttributeHelpers::Collection';
-
-has '+method_provider' => (
-    default => 'MooseX::AttributeHelpers::MethodProvider::Hash'
+define_attribute_helper (
+    helper_type      => 'HashRef',
+    method_provider  => 'MooseX::AttributeHelpers::MethodProvider::Hash',
+    shortcut         => 'Collection::Hash',
 );
 
-sub helper_type { 'HashRef' }
-
 no Moose;
-
-# register the alias ...
-package # hide me from search.cpan.org
-    Moose::Meta::Attribute::Custom::Collection::Hash;
-sub register_implementation { 'MooseX::AttributeHelpers::Collection::Hash' }
-
+no MooseX::AttributeHelpers::Sugar;
 
 1;
 
@@ -59,19 +53,10 @@ This module provides an Hash attribute which provides a number of
 hash-like operations. See L<MooseX::AttributeHelpers::MethodProvider::Hash>
 for more details.
 
-=head1 METHODS
-
-=over 4
-
-=item B<meta>
-
-=item B<method_provider>
-
-=item B<has_method_provider>
-
-=item B<helper_type>
+=head1 PROVIDED METHODS
 
-=back
+The methods for this metaclass are provided by
+L<MooseX::AttributeHelpers::MethodProvider::Hash>.
 
 =head1 BUGS
 
@@ -92,4 +77,4 @@ L<http://www.iinteractive.com>
 This library is free software; you can redistribute it and/or modify
 it under the same terms as Perl itself.
 
-=cut
\ No newline at end of file
+=cut