X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=t%2F040_type_constraints%2F012_container_type_coercion.t;h=f6237e8f7b4c000ce2440c2a6bf5c2e06e83c65f;hb=d03bd989b97597428b460d7f9a021e2931893fa0;hp=693a16efdad8ca19ec3837bc57e11d6f38f8f8ce;hpb=f6bee6fe1d579dc3d2ed2952cce9a1556040c8e5;p=gitmo%2FMoose.git diff --git a/t/040_type_constraints/012_container_type_coercion.t b/t/040_type_constraints/012_container_type_coercion.t index 693a16e..f6237e8 100644 --- a/t/040_type_constraints/012_container_type_coercion.t +++ b/t/040_type_constraints/012_container_type_coercion.t @@ -6,9 +6,9 @@ use warnings; use Test::More tests => 10; use Test::Exception; -BEGIN { - use_ok('Moose::Util::TypeConstraints'); - use_ok('Moose::Meta::TypeConstraint::Parameterized'); +BEGIN { + use_ok('Moose::Util::TypeConstraints'); + use_ok('Moose::Meta::TypeConstraint::Parameterized'); } my $r = Moose::Util::TypeConstraints->get_type_constraint_registry; @@ -47,17 +47,17 @@ is(find_type_constraint('HashRef[Int]'), $hash_of_ints, '... found the type we j package Foo; use Moose; use Moose::Util::TypeConstraints; - + coerce 'ArrayRef[Int]' => from 'HashRef[Int]' => via { [ values %$_ ] }; - + has 'bar' => ( is => 'ro', isa => 'ArrayRef[Int]', coerce => 1, ); - + } my $foo = Foo->new(bar => { one => 1, two => 2, three => 3 });