use warnings;
use Test::More;
-use Test::Fatal;
+use Test::Exception;
BEGIN {
use_ok('Moose::Util::TypeConstraints');
my $anon_type = subtype Object => where { $_->isa('HTTPHeader') };
-ok ! exception {
+lives_ok {
coerce $anon_type
=> from ArrayRef
=> via { HTTPHeader->new(array => $_[0]) }
=> from HashRef
=> via { HTTPHeader->new(hash => $_[0]) };
-}, 'coercion of anonymous subtype succeeds';
+} 'coercion of anonymous subtype succeeds';
foreach my $coercion (
find_type_constraint('Header')->coercion,