6 use Test::More tests => 9;
15 sub foo { 'Foo::foo' }
16 sub bar { 'Foo::bar' }
17 sub baz { 'Foo::baz' }
18 sub gorch { 'Foo::gorch' }
23 sub foo { 'Bar::foo' }
24 sub bar { 'Bar::bar' }
25 sub baz { 'Bar::baz' }
26 sub gorch { 'Bar::gorch' }
31 sub foo { 'Baz::foo' }
32 sub bar { 'Baz::bar' }
33 sub baz { 'Baz::baz' }
34 sub gorch { 'Baz::gorch' }
39 sub foo { 'Gorch::foo' }
40 sub bar { 'Gorch::bar' }
41 sub baz { 'Gorch::baz' }
42 sub gorch { 'Gorch::gorch' }
50 with 'Foo' => { -excludes => [qw/bar baz gorch/], -alias => { gorch => 'foo_gorch' } },
51 'Bar' => { -excludes => [qw/foo baz gorch/] },
52 'Baz' => { -excludes => [qw/foo bar gorch/], -alias => { foo => 'baz_foo', bar => 'baz_bar' } },
53 'Gorch' => { -excludes => [qw/foo bar baz/] };
54 } 'everything works out all right';
57 my $c = My::Class->new;
58 isa_ok($c, 'My::Class');
60 is($c->foo, 'Foo::foo', 'got the right method');
61 is($c->bar, 'Bar::bar', 'got the right method');
62 is($c->baz, 'Baz::baz', 'got the right method');
63 is($c->gorch, 'Gorch::gorch', 'got the right method');
65 is($c->foo_gorch, 'Foo::gorch', 'got the right method');
66 is($c->baz_foo, 'Baz::foo', 'got the right method');
67 is($c->baz_bar, 'Baz::bar', 'got the right method');