X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FMooseX%2FAttributeHelpers%2FCollection%2FHash.pm;h=c0a165f5c0610b16731f5c5f1b4e3a7625dd1a9e;hb=8ba40fb0b088c42192cad9bd39f45cfef520a975;hp=1131ae80c7b7433b6fe4e0f5c15fe7b1ad45fb29;hpb=17618d7865fceb2228d490052f2f44b55b6bf96a;p=gitmo%2FMooseX-AttributeHelpers.git diff --git a/lib/MooseX/AttributeHelpers/Collection/Hash.pm b/lib/MooseX/AttributeHelpers/Collection/Hash.pm index 1131ae8..c0a165f 100644 --- a/lib/MooseX/AttributeHelpers/Collection/Hash.pm +++ b/lib/MooseX/AttributeHelpers/Collection/Hash.pm @@ -1,13 +1,14 @@ package MooseX::AttributeHelpers::Collection::Hash; use Moose; -use Moose::Util::TypeConstraints; our $VERSION = '0.01'; our $AUTHORITY = 'cpan:STEVAN'; extends 'MooseX::AttributeHelpers::Base'; +sub helper_type { 'HashRef' } + has '+method_constructors' => ( default => sub { return +{ @@ -31,23 +32,7 @@ has '+method_constructors' => ( } ); -sub _process_options_for_provides { - my ($self, $options) = @_; - (exists $options->{isa}) - || confess "You must define a type with the Hash metaclass"; - - my $isa = $options->{isa}; - - unless (blessed($isa) && $isa->isa('Moose::Meta::TypeConstraint')) { - $isa = find_type_constraint($isa); - } - - ($isa->is_a_type_of('HashRef')) - || confess "The type constraint for a Hash ($options->{isa}) must be a subtype of HashRef"; -} - no Moose; -no Moose::Util::TypeConstraints; # register the alias ... package Moose::Meta::Attribute::Custom::Collection::Hash;