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;
8 sub foo { return (caller(0))[3] }
12 package MyClass1; use Mouse; with 'MyRole'; no Mouse;
13 package MyClass2; use Mouse; with 'MyRole'; no Mouse;
20 local $TODO = 'Role composition does not clone methods yet';
21 is(MyClass1->foo, 'MyClass1::foo',
22 'method from role has correct name in caller()');
23 is(MyClass2->foo, 'MyClass2::foo',
24 'method from role has correct name in caller()');
27 isnt(MyClass1->foo, "MyClass2::foo", "role method is not confused with other class" );
28 isnt(MyClass2->foo, "MyClass1::foo", "role method is not confused with other class" );