From: Shawn M Moore Date: Tue, 17 Jun 2008 02:49:09 +0000 (+0000) Subject: Make sure "with" works X-Git-Tag: 0.19~312 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=00c0e9c2dcc6d20f95f15ea1f2a3bebe54a2726c;p=gitmo%2FMouse.git Make sure "with" works --- diff --git a/lib/Mouse/Role.pm b/lib/Mouse/Role.pm index 3392f3e..b1164aa 100644 --- a/lib/Mouse/Role.pm +++ b/lib/Mouse/Role.pm @@ -27,6 +27,9 @@ do { has => sub { return sub { } }, + with => sub { + return sub { } + }, ); my $exporter = Sub::Exporter::build_exporter({ diff --git a/t/400-define-role.t b/t/400-define-role.t index ffc51d8..bde983f 100644 --- a/t/400-define-role.t +++ b/t/400-define-role.t @@ -49,3 +49,18 @@ lives_ok { no Mouse::Role; }; +do { + package Other::Role; + use Mouse::Role; + no Mouse::Role; +}; + +lives_ok { + package Role; + use Mouse::Role; + + with 'Other::Role'; + + no Mouse::Role; +}; +