fix uninitialized warning
Rafael Kitover [Fri, 28 Oct 2011 17:05:25 +0000 (13:05 -0400)]
Change the temporary loader used to extract the schema_base_class and
schema_components to be created with the schema => $self arg, so the
constructor (and _check_back_compat) can read the Schema.pm.

lib/DBIx/Class/Schema/Loader.pm

index 7e929a3..e826c66 100644 (file)
@@ -234,7 +234,8 @@ sub connection {
     # before connecting.
     require DBIx::Class::Schema::Loader::Base;
     my $temp_loader = DBIx::Class::Schema::Loader::Base->new(
-        %{ $self->_loader_args }
+        %{ $self->_loader_args },
+        schema => $self,
     );
 
     if ($temp_loader->schema_base_class || $temp_loader->schema_components) {