Another revamp of the selector resolution - now supporting unbalanced select/as
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Exception.pm
index 2bdfc8d..6c8d0e9 100644 (file)
@@ -3,9 +3,9 @@ package DBIx::Class::Exception;
 use strict;
 use warnings;
 
-use Carp::Clan qw/^DBIx::Class/;
-use Scalar::Util qw/blessed/;
+use Carp::Clan qw/^DBIx::Class|^Try::Tiny/;
 use Try::Tiny;
+use namespace::clean;
 
 use overload
     '""' => sub { shift->{msg} },
@@ -51,7 +51,7 @@ sub throw {
     my ($class, $msg, $stacktrace) = @_;
 
     # Don't re-encapsulate exception objects of any kind
-    die $msg if blessed($msg);
+    die $msg if ref($msg);
 
     # use Carp::Clan's croak if we're not stack tracing
     if(!$stacktrace) {