From: Yuval Kogman Date: Wed, 2 Jul 2008 14:32:58 +0000 (+0000) Subject: check that attr and method conflict in two different roles X-Git-Tag: 0_55~63 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=e953aaf50b9cea94ebfe04ca80aa09a0ced33f44;p=gitmo%2FMoose.git check that attr and method conflict in two different roles --- diff --git a/t/600_todo_tests/002_various_role_shit.t b/t/600_todo_tests/002_various_role_shit.t index 70333e8..915cf7a 100644 --- a/t/600_todo_tests/002_various_role_shit.t +++ b/t/600_todo_tests/002_various_role_shit.t @@ -117,6 +117,24 @@ sub req_or_has ($$) { sub bar { 33 } sub xxy { 7 } + + package Tree; + use Moose::Role; + + has bark => ( is => "rw" ); + + package Dog; + use Moose::Role; + + sub bark { warn "woof!" }; + + package EntPuppy; + use Moose; + + { + local our $TODO = "attrs and methods from a role should clash"; + ::dies_ok { with qw(Tree Dog) } + } } # these fail because of the deferral logic winning over actual methods