From: Shawn M Moore Date: Sun, 13 Jul 2008 15:23:18 +0000 (+0000) Subject: Failing test for unimport killing a method with the same name as a keyword X-Git-Tag: 0.19~262 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=df5525b435545379a78a35c54e73cd68602f80ed;p=gitmo%2FMouse.git Failing test for unimport killing a method with the same name as a keyword --- diff --git a/t/006-unimport.t b/t/006-unimport.t index 5245474..57b0a62 100644 --- a/t/006-unimport.t +++ b/t/006-unimport.t @@ -1,7 +1,7 @@ #!/usr/bin/env perl use strict; use warnings; -use Test::More tests => 2; +use Test::More tests => 5; do { package Class; @@ -19,3 +19,16 @@ do { ok(!Child->can('extends'), "extends keyword is unimported"); ok(!Class->can('extends'), "extends keyword is unimported"); +do { + package Foo; + use Mouse 'has'; + + sub extends { "good" } + + no Mouse; +}; + +ok(!Foo->can('has'), "has keyword is unimported"); +ok(Foo->can('extends'), "extends method is NOT unimported"); +is(Foo->extends, "good", "extends method is ours, not the extends keyword"); +