2 # This is automatically generated by author/import-moose-test.pl.
3 # DO NOT EDIT THIS FILE. ANY CHANGES WILL BE LOST!!!
4 use t::lib::MooseCompat;
25 -alias => { foo => 'baz', bar => 'gorch' },
26 -excludes => ['foo', 'bar'],
31 my $x = My::Class->new;
32 isa_ok($x, 'My::Class');
33 does_ok($x, 'My::Role');
35 can_ok($x, $_) for qw[baz gorch];
37 ok(!$x->can($_), '... cant call method ' . $_) for qw[foo bar];
39 is($x->baz, 'FOO', '... got the right value');
40 is($x->gorch, 'BAR', '... got the right value');
44 package My::Role::Again;
48 -alias => { foo => 'baz', bar => 'gorch' },
49 -excludes => ['foo', 'bar'],
52 package My::Class::Again;
55 with 'My::Role::Again';
59 my $x = My::Class::Again->new;
60 isa_ok($x, 'My::Class::Again');
61 does_ok($x, 'My::Role::Again');
62 does_ok($x, 'My::Role');
64 can_ok($x, $_) for qw[baz gorch];
66 ok(!$x->can($_), '... cant call method ' . $_) for qw[foo bar];
68 is($x->baz, 'FOO', '... got the right value');
69 is($x->gorch, 'BAR', '... got the right value');