From: Tomas Doran Date: Mon, 7 May 2012 15:03:57 +0000 (+0100) Subject: Another broken case where Moo::Role, then namespace::autoclean get loaded X-Git-Tag: v0.091004~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=087c79b5dee4047d9b96a52e52e55c2105e9c4c0;p=gitmo%2FMoo.git Another broken case where Moo::Role, then namespace::autoclean get loaded --- diff --git a/xt/lib/ExampleMooRoleWithAttribute.pm b/xt/lib/ExampleMooRoleWithAttribute.pm new file mode 100644 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 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; +