Ditch Carp::Clan for our own thing
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / TxnScopeGuard.pm
index 9bda8bb..d5291fa 100644 (file)
@@ -2,27 +2,25 @@ package DBIx::Class::Storage::TxnScopeGuard;
 
 use strict;
 use warnings;
-use Carp::Clan qw/^DBIx::Class/;
 use Try::Tiny;
 use Scalar::Util qw/weaken blessed/;
 use DBIx::Class::Exception;
-use namespace::clean;
+use DBIx::Class::Carp;
 
 # temporary until we fix the $@ issue in core
 # we also need a real appendable, stackable exception object
 # (coming soon)
 BEGIN {
-  if ($] < 5.013001) {
-    *IS_BROKEN_PERL = sub () { 0 };
-  }
-  elsif ($] < 5.013008) {
+  if ($] >= 5.013001 and $] <= 5.013007) {
     *IS_BROKEN_PERL = sub () { 1 };
   }
   else {
-    die 'The $@ debacle should have been resolved by now, adjust DBIC';
+    *IS_BROKEN_PERL = sub () { 0 };
   }
 }
 
+use namespace::clean;
+
 my ($guards_count, $compat_handler, $foreign_handler);
 
 sub new {