blob: 97e98d3621efb225ba5657996c6525d3183f9869 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#!/usr/bin/env perl
use strict;
use warnings;
use Test::More;
use lib 't/lib';
{
package Foo;
use Moose;
use Bread::Board::Declare;
has foo => (
is => 'ro',
isa => 'Inferred::Foo',
infer => 1,
);
has bar => (
is => 'ro',
isa => 'Inferred::Bar',
);
}
{
my $c = Foo->new;
isa_ok($c->foo, 'Inferred::Foo');
isa_ok($c->foo->bar, 'Inferred::Bar');
isa_ok($c->bar, 'Inferred::Bar');
}
done_testing;
|