From: Hans Dieter Pearcey Date: Sat, 28 Feb 2009 15:19:06 +0000 (+0000) Subject: as requested by rafl X-Git-Tag: 0.72_01~92 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b6f7ee15d59d9b3c484cef277e314ca1b26cc6bf;p=gitmo%2FMoose.git as requested by rafl --- diff --git a/t/100_bugs/022_role_caller.t b/t/100_bugs/022_role_caller.t new file mode 100644 index 0000000..69988c3 --- /dev/null +++ b/t/100_bugs/022_role_caller.t @@ -0,0 +1,21 @@ +package MyRole; + +use Moose::Role; + +sub foo { return (caller(0))[3] } + +no Moose::Role; + +package MyClass1; use Moose; with 'MyRole'; no Moose; +package MyClass2; use Moose; with 'MyRole'; no Moose; + +package main; + +use Test::More tests => 2; + +{ + local $TODO = 'for rafl'; + is(MyClass1->foo, 'MyClass1::foo', + 'method from role has correct name in caller()'); +} +is(MyClass2->foo, 'MyClass2::foo');