X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FSybase.pm;h=628832537cac8b567d4f82801ee1cff0d8f0e247;hb=b0c42bbc89cfad32585c32d5360cc1151b2ad8c9;hp=4631117e16dad591639e39444ce8eea646d79d25;hpb=619f81c4e80407520781678162e020ca8d7bf0ef;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/lib/DBIx/Class/Storage/DBI/Sybase.pm b/lib/DBIx/Class/Storage/DBI/Sybase.pm index 4631117..6288325 100644 --- a/lib/DBIx/Class/Storage/DBI/Sybase.pm +++ b/lib/DBIx/Class/Storage/DBI/Sybase.pm @@ -21,28 +21,25 @@ L =cut -sub _rebless { +sub _rebless { shift->_determine_connector_driver('Sybase') } + +sub _get_rdbms_name { my $self = shift; - my $dbtype; try { - $dbtype = @{$self->_get_dbh->selectrow_arrayref(qq{sp_server_info \@attribute_id=1})}[2] - } catch { - $self->throw_exception("Unable to establish connection to determine database type: $_") - }; - - if ($dbtype) { - $dbtype =~ s/\W/_/gi; + my $name = $self->_get_dbh->selectrow_arrayref('sp_server_info @attribute_id=1')->[2]; - # saner class name - $dbtype = 'ASE' if $dbtype eq 'SQL_Server'; + if ($name) { + $name =~ s/\W/_/gi; - my $subclass = __PACKAGE__ . "::$dbtype"; - if ($self->load_optional_class($subclass)) { - bless $self, $subclass; - $self->_rebless; + # saner class name + $name = 'ASE' if $name eq 'SQL_Server'; } - } + + $name; # RV + } catch { + $self->throw_exception("Unable to establish connection to determine database type: $_") + }; } sub _init {