use ensure_class_loaded in odbc driver
Rafael Kitover [Wed, 27 May 2009 04:34:59 +0000 (04:34 +0000)]
lib/DBIx/Class/Schema/Loader/DBI/ODBC.pm

index a221ba3..f709b5d 100644 (file)
@@ -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);
   }
 }