Rename vaguely named internal method
[dbsrgits/DBIx-Class.git] / lib / DBIx / Class / Storage / DBI / ADO.pm
index 6523664..aa9fb5d 100644 (file)
@@ -3,6 +3,7 @@ package # hide from PAUSE
 
 use base 'DBIx::Class::Storage::DBI';
 use Try::Tiny;
+use namespace::clean;
 
 sub _rebless {
   my $self = shift;
@@ -11,24 +12,18 @@ sub _rebless {
 # XXX This should be using an OpenSchema method of some sort, but I don't know
 # how.
 # Current version is stolen from Sybase.pm
-  my $caught;
-  my $dbtype;
   try {
-    $dbtype = @{$self->_get_dbh
+    my $dbtype = @{$self->_get_dbh
       ->selectrow_arrayref(qq{sp_server_info \@attribute_id=1})
-    }[2]
-  } catch {
-    $caught = 1;
-  };
+    }[2];
 
-  unless ($caught) {
     $dbtype =~ s/\W/_/gi;
     my $subclass = "DBIx::Class::Storage::DBI::ADO::${dbtype}";
     if ($self->load_optional_class($subclass) && !$self->isa($subclass)) {
       bless $self, $subclass;
       $self->_rebless;
     }
-  }
+  };
 }
 
 # Here I was just experimenting with ADO cursor types, left in as a comment in