Revert to eval instead of try::tiny because no check for $@
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Schema / Versioned.pm
index d192d21..2021cf7 100644 (file)
@@ -724,10 +724,14 @@ sub _source_exists
 {
     my ($self, $rs) = @_;
 
-    my $c = eval {
-        $rs->search({ 1, 0 })->count;
+    my $c;
+    my $exception;
+    try {
+        $c = $rs->search({ 1, 0 })->count;
+    } catch {
+        $exception=1;
     };
-    return 0 if $@ || !defined $c;
+    return 0 if $exception || !defined $c;
 
     return 1;
 }