Disable foreign class warnings (PERL_MOUSE_STRICT will enable this)
[gitmo/Mouse.git] / lib / Mouse / Meta / Class.pm
index f278f5a..ae611ec 100644 (file)
@@ -93,9 +93,11 @@ sub verify_superclass {
 
 sub inherit_from_foreign_class {
     my($class, $super) = @_;
-    Carp::carp("You inherit from non-Mouse class ($super),"
-        . " but it is unlikely to work correctly."
-        . " Please consider using MouseX::Foreign");
+    if($ENV{PERL_MOUSE_STRICT}) {
+        Carp::carp("You inherit from non-Mouse class ($super),"
+            . " but it is unlikely to work correctly."
+            . " Please consider using MouseX::Foreign");
+    }
     return;
 }