use warnings;
use Test::More;
-use Test::Fatal;
+use Test::Exception;
BEGIN {
use_ok("Moose::Util::TypeConstraints");
subtype 'MyList' => as 'Object' => where { $_->isa('MyList') };
-ok ! exception {
+lives_ok {
coerce 'ArrayRef'
=> from 'MyList'
=> via { [ $_->items ] }
-}, '... created the coercion okay';
+} '... created the coercion okay';
my $mylist = Moose::Util::TypeConstraints::find_or_parse_type_constraint('MyList[Int]');
# XXX: get this to work *without* the declaration. I suspect it'll be a new
# method in Moose::Meta::TypeCoercion that will look at the parents of the
# coerced type as well. but will that be too "action at a distance"-ey?
-ok ! exception {
+lives_ok {
coerce 'ArrayRef'
=> from 'EvenList'
=> via { [ $_->items ] }
-}, '... created the coercion okay';
+} '... created the coercion okay';
my $evenlist = Moose::Util::TypeConstraints::find_or_parse_type_constraint('EvenList[Int]');