X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=lib%2FDBIx%2FClass%2FStorage%2FDBI%2FADO.pm;h=aa9fb5d19f1e51e799f620f6154c2f8d2d2fb4fb;hb=bd691933d70d05a09c34dd7df75a14cee44cc3f4;hp=6523664f052f79d4e62e2215d7ed62253aef240b;hpb=ed7ab0f4ce1a9118ea6285ee562ef003085a6b64;p=dbsrgits%2FDBIx-Class.git diff --git a/lib/DBIx/Class/Storage/DBI/ADO.pm b/lib/DBIx/Class/Storage/DBI/ADO.pm index 6523664..aa9fb5d 100644 --- a/lib/DBIx/Class/Storage/DBI/ADO.pm +++ b/lib/DBIx/Class/Storage/DBI/ADO.pm @@ -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