fix relbuilder initialization (left over from pull)
Rafael Kitover [Sun, 1 Nov 2009 10:52:40 +0000 (10:52 +0000)]
lib/DBIx/Class/Schema/Loader/Base.pm

index a8ccc74..70602ea 100644 (file)
@@ -272,10 +272,6 @@ sub new {
 
     $self->{dump_directory} ||= $self->{temp_directory};
 
-    $self->{relbuilder} = DBIx::Class::Schema::Loader::RelBuilder->new(
-        $self->schema, $self->inflect_plural, $self->inflect_singular
-    ) if !$self->{skip_relationships};
-
     $self->_check_back_compat;
 
     $self;
@@ -409,6 +405,9 @@ sub rescan {
 
 sub _relbuilder {
     my ($self) = @_;
+
+    return if $self->{skip_relationships};
+
     $self->{relbuilder} ||= DBIx::Class::Schema::Loader::RelBuilder->new(
         $self->schema, $self->inflect_plural, $self->inflect_singular
     );