diff options
author | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2011-12-22 16:54:52 +0000 |
---|---|---|
committer | Gianni Ceccarelli <gianni.ceccarelli@net-a-porter.com> | 2011-12-22 16:54:52 +0000 |
commit | 232ec507ed438fce63991f6ce8169365f430f062 (patch) | |
tree | 0ff3a084bce4402c7e52b4b67af406191df4c232 /lib | |
parent | Build results of 8bb2d9b (on master) (diff) | |
parent | remove MooseX::Types as far as sensible (diff) | |
download | data-multivalued-232ec507ed438fce63991f6ce8169365f430f062.tar.gz data-multivalued-232ec507ed438fce63991f6ce8169365f430f062.tar.bz2 data-multivalued-232ec507ed438fce63991f6ce8169365f430f062.zip |
Build results of e9892ef (on master)
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Data/MultiValued/AttributeTrait.pm | 5 | ||||
-rw-r--r-- | lib/Data/MultiValued/Ranges.pm | 15 | ||||
-rw-r--r-- | lib/Data/MultiValued/Tags.pm | 9 | ||||
-rw-r--r-- | lib/Data/MultiValued/TagsAndRanges.pm | 19 |
4 files changed, 22 insertions, 26 deletions
diff --git a/lib/Data/MultiValued/AttributeTrait.pm b/lib/Data/MultiValued/AttributeTrait.pm index 3aeb3c0..24c6e03 100644 --- a/lib/Data/MultiValued/AttributeTrait.pm +++ b/lib/Data/MultiValued/AttributeTrait.pm @@ -8,7 +8,6 @@ package Data::MultiValued::AttributeTrait; use Moose::Role; use namespace::autoclean; use Data::MultiValued::AttributeAccessors; -use MooseX::Types::Moose qw(Str); use Try::Tiny; use namespace::autoclean; @@ -17,7 +16,7 @@ use namespace::autoclean; has 'full_storage_slot' => ( is => 'ro', - isa => Str, + isa => 'Str', lazy_build => 1, ); sub _build_full_storage_slot { shift->name . '__MULTIVALUED_STORAGE__' } @@ -28,7 +27,7 @@ my @accs_to_multiply=qw(accessor reader writer predicate clearer); for my $acc (@accs_to_multiply) { has "multi_$acc" => ( is => 'ro', - isa => Str, + isa => 'Str', predicate => "has_multi_$acc", ); } diff --git a/lib/Data/MultiValued/Ranges.pm b/lib/Data/MultiValued/Ranges.pm index 186a7de..9beb1a8 100644 --- a/lib/Data/MultiValued/Ranges.pm +++ b/lib/Data/MultiValued/Ranges.pm @@ -7,9 +7,8 @@ package Data::MultiValued::Ranges; } use Moose; use namespace::autoclean; -use MooseX::Params::Validate; use Moose::Util::TypeConstraints; -use MooseX::Types::Moose qw(Num Str Undef Any); +use MooseX::Params::Validate; use Data::MultiValued::Exceptions; use Data::MultiValued::RangeContainer; @@ -31,9 +30,9 @@ sub _build__storage { sub set { my ($self,%args) = validated_hash( \@_, - from => { isa => Num|Undef, optional => 1, }, - to => { isa => Num|Undef, optional => 1, }, - value => { isa => Any, }, + from => { isa => 'Num|Undef', optional => 1, }, + to => { isa => 'Num|Undef', optional => 1, }, + value => { isa => 'Any', }, ); $self->_storage->get_or_create(\%args) @@ -44,7 +43,7 @@ sub set { sub get { my ($self,%args) = validated_hash( \@_, - at => { isa => Num|Undef, optional => 1, }, + at => { isa => 'Num|Undef', optional => 1, }, ); $self->_storage->get(\%args) @@ -55,8 +54,8 @@ sub get { sub clear { my ($self,%args) = validated_hash( \@_, - from => { isa => Num|Undef, optional => 1, }, - to => { isa => Num|Undef, optional => 1, }, + from => { isa => 'Num|Undef', optional => 1, }, + to => { isa => 'Num|Undef', optional => 1, }, ); $self->_storage->clear(\%args); diff --git a/lib/Data/MultiValued/Tags.pm b/lib/Data/MultiValued/Tags.pm index 5806a14..6d213d4 100644 --- a/lib/Data/MultiValued/Tags.pm +++ b/lib/Data/MultiValued/Tags.pm @@ -9,7 +9,6 @@ use Moose; use namespace::autoclean; use MooseX::Params::Validate; use Moose::Util::TypeConstraints; -use MooseX::Types::Moose qw(Num Str Undef Any); use Data::MultiValued::Exceptions; use Data::MultiValued::TagContainer; @@ -31,8 +30,8 @@ sub _build__storage { sub set { my ($self,%args) = validated_hash( \@_, - tag => { isa => Str, optional => 1, }, - value => { isa => Any, }, + tag => { isa => 'Str', optional => 1, }, + value => { isa => 'Any', }, ); $self->_storage->get_or_create(\%args) @@ -43,7 +42,7 @@ sub set { sub get { my ($self,%args) = validated_hash( \@_, - tag => { isa => Str, optional => 1, }, + tag => { isa => 'Str', optional => 1, }, ); $self->_storage->get(\%args) @@ -54,7 +53,7 @@ sub get { sub clear { my ($self,%args) = validated_hash( \@_, - tag => { isa => Str, optional => 1, }, + tag => { isa => 'Str', optional => 1, }, ); $self->_storage->clear(\%args); diff --git a/lib/Data/MultiValued/TagsAndRanges.pm b/lib/Data/MultiValued/TagsAndRanges.pm index d8e8d83..e75f0f5 100644 --- a/lib/Data/MultiValued/TagsAndRanges.pm +++ b/lib/Data/MultiValued/TagsAndRanges.pm @@ -9,7 +9,6 @@ use Moose; use namespace::autoclean; use MooseX::Params::Validate; use Moose::Util::TypeConstraints; -use MooseX::Types::Moose qw(Num Str Undef Any); use Data::MultiValued::Exceptions; use Data::MultiValued::TagContainerForRanges; @@ -31,10 +30,10 @@ sub _build__storage { sub set { my ($self,%args) = validated_hash( \@_, - from => { isa => Num|Undef, optional => 1, }, - to => { isa => Num|Undef, optional => 1, }, - tag => { isa => Str, optional => 1, }, - value => { isa => Any, }, + from => { isa => 'Num|Undef', optional => 1, }, + to => { isa => 'Num|Undef', optional => 1, }, + tag => { isa => 'Str', optional => 1, }, + value => { isa => 'Any', }, ); $self->_storage->get_or_create(\%args) @@ -46,8 +45,8 @@ sub set { sub get { my ($self,%args) = validated_hash( \@_, - at => { isa => Num|Undef, optional => 1, }, - tag => { isa => Str, optional => 1, }, + at => { isa => 'Num|Undef', optional => 1, }, + tag => { isa => 'Str', optional => 1, }, ); $self->_storage->get(\%args) @@ -59,9 +58,9 @@ sub get { sub clear { my ($self,%args) = validated_hash( \@_, - from => { isa => Num|Undef, optional => 1, }, - to => { isa => Num|Undef, optional => 1, }, - tag => { isa => Str, optional => 1, }, + from => { isa => 'Num|Undef', optional => 1, }, + to => { isa => 'Num|Undef', optional => 1, }, + tag => { isa => 'Str', optional => 1, }, ); if (exists $args{from} || exists $args{to}) { |