summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/Data/MultiValued/AttributeTrait.pm5
-rw-r--r--lib/Data/MultiValued/Ranges.pm15
-rw-r--r--lib/Data/MultiValued/Tags.pm9
-rw-r--r--lib/Data/MultiValued/TagsAndRanges.pm19
4 files changed, 22 insertions, 26 deletions
diff --git a/lib/Data/MultiValued/AttributeTrait.pm b/lib/Data/MultiValued/AttributeTrait.pm
index eb8cbd3..4ebf474 100644
--- a/lib/Data/MultiValued/AttributeTrait.pm
+++ b/lib/Data/MultiValued/AttributeTrait.pm
@@ -2,7 +2,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;
@@ -51,7 +50,7 @@ C<$name> is the attribute name.
has 'full_storage_slot' => (
is => 'ro',
- isa => Str,
+ isa => 'Str',
lazy_build => 1,
);
sub _build_full_storage_slot { shift->name . '__MULTIVALUED_STORAGE__' }
@@ -86,7 +85,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 5f193ba..d03153d 100644
--- a/lib/Data/MultiValued/Ranges.pm
+++ b/lib/Data/MultiValued/Ranges.pm
@@ -1,9 +1,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;
@@ -73,9 +72,9 @@ just stored.
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)
@@ -102,7 +101,7 @@ untouched.
sub get {
my ($self,%args) = validated_hash(
\@_,
- at => { isa => Num|Undef, optional => 1, },
+ at => { isa => 'Num|Undef', optional => 1, },
);
$self->_storage->get(\%args)
@@ -141,8 +140,8 @@ other words:
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 8ba06f3..063a778 100644
--- a/lib/Data/MultiValued/Tags.pm
+++ b/lib/Data/MultiValued/Tags.pm
@@ -3,7 +3,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;
@@ -52,8 +51,8 @@ just stored.
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)
@@ -79,7 +78,7 @@ untouched.
sub get {
my ($self,%args) = validated_hash(
\@_,
- tag => { isa => Str, optional => 1, },
+ tag => { isa => 'Str', optional => 1, },
);
$self->_storage->get(\%args)
@@ -101,7 +100,7 @@ is no way to just clear the value for the C<undef> tag.
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 2f06452..43bff6b 100644
--- a/lib/Data/MultiValued/TagsAndRanges.pm
+++ b/lib/Data/MultiValued/TagsAndRanges.pm
@@ -3,7 +3,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;
@@ -52,10 +51,10 @@ L<Data::MultiValued::Ranges/set> for more details.
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)
@@ -82,8 +81,8 @@ L<Data::MultiValued::Ranges/get> for more details.
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)
@@ -108,9 +107,9 @@ L<Data::MultiValued::Ranges/clear> for more details.
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}) {