Stop importing Carp functions
Peter Rabbitson [Sat, 19 Mar 2011 23:34:35 +0000 (23:34 +0000)]
Changes
lib/Class/C3/Componentised.pm

diff --git a/Changes b/Changes
index c7d3974..0f95060 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,5 +1,8 @@
 Revision history for Class-C3-Componentised
 
+        Stop importing Carp functions (and thus polluting the inheritor
+        namespaces)
+
 1.0008   24 Feb 2011
         Fix inject_base regression introduced during optimizations in
         1.0007
index 8d3058a..a86108a 100644 (file)
@@ -47,7 +47,7 @@ use warnings;
 # Therefore leaving it in indefinitely.
 use MRO::Compat;
 
-use Carp;
+use Carp ();
 
 our $VERSION = 1.0008;
 
@@ -151,7 +151,7 @@ sub ensure_class_loaded {
     if ($class->can('throw_exception')) {
       $class->throw_exception($@);
     } else {
-      croak $@;
+      Carp::croak $@;
     }
   };