piss off. -- mst
Matt S Trout [Tue, 26 Jun 2012 18:35:06 +0000 (18:35 +0000)]
Changes
lib/Moo.pm
t/no-moo.t [new file with mode: 0644]

diff --git a/Changes b/Changes
index 206c656..509755d 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,3 +1,4 @@
+  - squelch used only once warnings for $Moo::HandleMoose::MOUSE
   - MooClass->meta
   - subconstructor handling for Moose classes
 
index 2034459..51f0dc6 100644 (file)
@@ -26,6 +26,7 @@ sub import {
       Moo->_constructor_maker_for($target)
          ->register_attribute_specs(%{$old->all_attribute_specs});
     }
+    no warnings 'once'; # piss off. -- mst
     $Moo::HandleMoose::MOUSE{$target} = [
       grep defined, map Mouse::Util::find_meta($_), @_
     ] if $INC{"Mouse.pm"};
diff --git a/t/no-moo.t b/t/no-moo.t
new file mode 100644 (file)
index 0000000..c857ef4
--- /dev/null
@@ -0,0 +1,19 @@
+use strictures 1;
+use Test::More;
+
+{
+  package Spoon;
+
+  use Moo;
+
+  no warnings 'redefine';
+
+  sub has { "has!" }
+
+  no Moo;
+}
+
+ok(!Spoon->can('extends'), 'extends cleaned');
+is(Spoon->has, "has!", 'has left alone');
+
+done_testing;