From: Shawn M Moore Date: Tue, 24 Jun 2008 06:07:37 +0000 (+0000) Subject: Test that "no Moose::Role" doesn't explode, qualify the namespace of Moose::_get_caller X-Git-Tag: 0_55~97 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=fd75e12b79b886a8df10ca64013349425f00070e;p=gitmo%2FMoose.git Test that "no Moose::Role" doesn't explode, qualify the namespace of Moose::_get_caller --- diff --git a/lib/Moose/Role.pm b/lib/Moose/Role.pm index ef5f044..4467519 100644 --- a/lib/Moose/Role.pm +++ b/lib/Moose/Role.pm @@ -184,7 +184,7 @@ use Moose::Util::TypeConstraints; sub unimport { no strict 'refs'; - my $class = _get_caller(@_); + my $class = Moose::_get_caller(@_); # loop through the exports ... foreach my $name ( keys %exports ) { diff --git a/t/030_roles/002_role.t b/t/030_roles/002_role.t index 875db47..4026a3b 100644 --- a/t/030_roles/002_role.t +++ b/t/030_roles/002_role.t @@ -45,6 +45,8 @@ words, should 'has_method' return true for them? ::dies_ok { extends() } '... extends() is not supported'; ::dies_ok { augment() } '... augment() is not supported'; ::dies_ok { inner() } '... inner() is not supported'; + + no Moose::Role; } my $foo_role = FooRole->meta;