use strict;
use warnings;
-use Test::More tests => 14;
+use Test::More tests => 13;
{
package Response::Headers;
};
ok !$@;
-eval {
- package Response;
- type 'Headers' => where {
- eval { $_->isa('Response::Headers') }
- };
-};
-ok(!$@, "You can redefine types in their original package");
-
{
package Request;
use Mouse;
);
}
-
my $req = Request->new(headers => { foo => 'bar' });
isa_ok($req->headers, 'Response::Headers');
is($req->headers->foo, 'bar');
$res->headers({foo => 'yay'});
isa_ok($res->headers, 'Response::Headers');
is($res->headers->foo, 'yay');
+