Switch storage class loading to ensure_class_loaded
Peter Rabbitson [Tue, 25 Aug 2009 10:35:19 +0000 (10:35 +0000)]
lib/DBIx/Class/Schema.pm

index a7080e2..2451f55 100644 (file)
@@ -814,7 +814,7 @@ sub connection {
 
   $storage_class = 'DBIx::Class::Storage'.$storage_class
     if $storage_class =~ m/^::/;
-  eval "require ${storage_class};";
+  eval { $self->ensure_class_loaded ($storage_class) };
   $self->throw_exception(
     "No arguments to load_classes and couldn't load ${storage_class} ($@)"
   ) if $@;