type 'Headers' => where { defined $_ && eval { $_->isa('Request::Headers') } };
};
-like $@, qr/The type constraint 'Headers' has already been created, cannot be created again in Request/;
+like $@, qr/The type constraint 'Headers' has already been created in Response and cannot be created again in Request/;
eval {
package Request;
use Mouse::Util::TypeConstraints;
coerce 'Headers' =>
- from 'HashRefa' => via {
+ from 'XXX' => via {
Request::Headers->new(%{ $_ });
},
;
};
-like $@, qr/Could not find the type constraint \(HashRefa\) to coerce from/;
+like $@, qr/Could not find the type constraint \(XXX\) to coerce from/;
eval {
package Request;
package Response;
type 'Headers' => where { defined $_ && eval { $_->isa('Response::Headers') } };
};
-like $@, qr/The type constraint 'Headers' has already been created, cannot be created again in Response/;
+like $@, qr/The type constraint 'Headers' has already been created in Response and cannot be created again in Response/;
{
package Request;