[Moose-commits] r7806 - Moose/trunk/t/100_bugs
hdp at code2.0beta.co.uk
hdp at code2.0beta.co.uk
Sat Feb 28 15:19:07 GMT 2009
Author: hdp
Date: 2009-02-28 07:19:06 -0800 (Sat, 28 Feb 2009)
New Revision: 7806
Added:
Moose/trunk/t/100_bugs/022_role_caller.t
Log:
as requested by rafl
Added: Moose/trunk/t/100_bugs/022_role_caller.t
===================================================================
--- Moose/trunk/t/100_bugs/022_role_caller.t (rev 0)
+++ Moose/trunk/t/100_bugs/022_role_caller.t 2009-02-28 15:19:06 UTC (rev 7806)
@@ -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');
More information about the Moose-commits
mailing list