6 use Test::More tests => 17;
22 -alias => { foo => 'baz', bar => 'gorch' },
23 -excludes => ['foo', 'bar'],
28 my $x = My::Class->new;
29 isa_ok($x, 'My::Class');
30 does_ok($x, 'My::Role');
32 can_ok($x, $_) for qw[baz gorch];
34 ok(!$x->can($_), '... cant call method ' . $_) for qw[foo bar];
36 is($x->baz, 'FOO', '... got the right value');
37 is($x->gorch, 'BAR', '... got the right value');
41 package My::Role::Again;
45 -alias => { foo => 'baz', bar => 'gorch' },
46 -excludes => ['foo', 'bar'],
49 package My::Class::Again;
52 with 'My::Role::Again';
56 my $x = My::Class::Again->new;
57 isa_ok($x, 'My::Class::Again');
58 does_ok($x, 'My::Role::Again');
59 does_ok($x, 'My::Role');
61 can_ok($x, $_) for qw[baz gorch];
63 ok(!$x->can($_), '... cant call method ' . $_) for qw[foo bar];
65 is($x->baz, 'FOO', '... got the right value');
66 is($x->gorch, 'BAR', '... got the right value');