Try::Tiny conversion finished
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / MSSQL.pm
index 5218070..0b1e57e 100644 (file)
@@ -242,14 +242,12 @@ sub _ping {
   local $dbh->{RaiseError} = 1;
   local $dbh->{PrintError} = 0;
 
-  my $rc = 1;
-  try {
+  return try {
     $dbh->do('select 1');
+    1;
   } catch {
-    $rc = 0;
+    0;
   };
-
-  return $rc;
 }
 
 package # hide from PAUSE