BEGIN {
use_ok('Moose::Util::TypeConstraints');
- use_ok('Moose::Meta::TypeConstraint::Container');
+ use_ok('Moose::Meta::TypeConstraint::Parameterized');
}
-my $r = Moose::Util::TypeConstraints->_get_type_constraint_registry;
+my $r = Moose::Util::TypeConstraints->get_type_constraint_registry;
# Array of Ints
-my $array_of_ints = Moose::Meta::TypeConstraint::Container->new(
+my $array_of_ints = Moose::Meta::TypeConstraint::Parameterized->new(
name => 'ArrayRef[Int]',
parent => find_type_constraint('ArrayRef'),
- container_type => find_type_constraint('Int'),
+ type_parameter => find_type_constraint('Int'),
);
-isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint::Container');
+isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint::Parameterized');
isa_ok($array_of_ints, 'Moose::Meta::TypeConstraint');
$r->add_type_constraint($array_of_ints);
# Hash of Ints
-my $hash_of_ints = Moose::Meta::TypeConstraint::Container->new(
+my $hash_of_ints = Moose::Meta::TypeConstraint::Parameterized->new(
name => 'HashRef[Int]',
parent => find_type_constraint('HashRef'),
- container_type => find_type_constraint('Int'),
+ type_parameter => find_type_constraint('Int'),
);
-isa_ok($hash_of_ints, 'Moose::Meta::TypeConstraint::Container');
+isa_ok($hash_of_ints, 'Moose::Meta::TypeConstraint::Parameterized');
isa_ok($hash_of_ints, 'Moose::Meta::TypeConstraint');
$r->add_type_constraint($hash_of_ints);