Test to make sure -metaclass works
Shawn M Moore [Wed, 15 Apr 2009 20:39:52 +0000 (16:39 -0400)]
t/030_roles/038_new_meta_role.t [new file with mode: 0644]

diff --git a/t/030_roles/038_new_meta_role.t b/t/030_roles/038_new_meta_role.t
new file mode 100644 (file)
index 0000000..000fd8e
--- /dev/null
@@ -0,0 +1,18 @@
+#!/usr/bin/env perl
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+do {
+    package My::Meta::Role;
+    use Moose;
+    BEGIN { extends 'Moose::Meta::Role' };
+};
+
+do {
+    package My::Role;
+    use Moose::Role -metaclass => 'My::Meta::Role';
+};
+
+is(My::Role->meta->meta->name, 'My::Meta::Role');
+