projects
/
gitmo/Moo.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
(parent:
cd8a064
)
Another broken case where Moo::Role, then namespace::autoclean get loaded
Tomas Doran [Mon, 7 May 2012 15:03:57 +0000 (16:03 +0100)]
xt/lib/ExampleMooRoleWithAttribute.pm
[new file with mode: 0644]
patch
|
blob
xt/moo-roles-into-moose-class-attr-override-with-autoclean.t
[new file with mode: 0644]
patch
|
blob
diff --git a/xt/lib/ExampleMooRoleWithAttribute.pm
b/xt/lib/ExampleMooRoleWithAttribute.pm
new file mode 100644
(file)
index 0000000..
a1f1884
--- /dev/null
+++ b/
xt/lib/ExampleMooRoleWithAttribute.pm
@@ -0,0
+1,12
@@
+package ExampleMooRoleWithAttribute;;
+use Moo::Role;
+# Note that autoclean here is the key bit!
+use namespace::autoclean;
+
+has output_to => (
+ is => 'ro',
+ required => 1,
+);
+
+1;
+
diff --git a/xt/moo-roles-into-moose-class-attr-override-with-autoclean.t
b/xt/moo-roles-into-moose-class-attr-override-with-autoclean.t
new file mode 100644
(file)
index 0000000..
cccb7d1
--- /dev/null
+++ b/
xt/moo-roles-into-moose-class-attr-override-with-autoclean.t
@@ -0,0
+1,23
@@
+use strict;
+use warnings;
+use Test::More;
+use FindBin qw/ $Bin /;
+use lib "$Bin/lib";
+
+{
+ package Bax;
+ use Moose;
+
+ with qw/
+ ExampleMooRoleWithAttribute
+ /;
+
+
+ has '+output_to' => (
+ required => 1,
+ );
+}
+
+ok 1;
+done_testing;
+