From: Rafael Kitover Date: Wed, 27 May 2009 04:34:59 +0000 (+0000) Subject: use ensure_class_loaded in odbc driver X-Git-Tag: 0.04999_08~12^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=8516e7e805188a6dd45e4345cbc5e2b3823a30be;p=dbsrgits%2FDBIx-Class-Schema-Loader.git use ensure_class_loaded in odbc driver --- diff --git a/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm b/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm index a221ba3..f709b5d 100644 --- a/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm +++ b/lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm @@ -35,8 +35,7 @@ sub _rebless { # Translate the backend name into a perl identifier $dbtype =~ s/\W/_/gi; my $class = "DBIx::Class::Schema::Loader::DBI::ODBC::${dbtype}"; - eval { $self->ensure_class_loaded($class) }; - bless $self, $class unless $@; + bless $self, $class if $self->load_optional_class($class); } }