use warnings;
use Test::More;
-use Test::Exception;
+use Test::Fatal;
BEGIN {
- use_ok('Moose::Util::TypeConstraints');
+ use_ok('Moose::Util::TypeConstraints');
}
{
my $anon_type = subtype Object => where { $_->isa('HTTPHeader') };
-lives_ok {
+ok ! exception {
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,