Fix ::Versioned regression introduced in r7925
Peter Rabbitson [Mon, 23 Nov 2009 00:28:50 +0000 (00:28 +0000)]
lib/DBIx/Class/Schema/Versioned.pm

index e8854e3..bce2032 100644 (file)
@@ -473,12 +473,12 @@ sub _on_connect
 
   $args = {} unless $args;
 
-  # useful when connecting from scripts etc
-  return if ($args->{ignore_version} || ($ENV{DBIC_NO_VERSION_CHECK} && !exists $args->{ignore_version}));
-
   $self->{vschema} = DBIx::Class::Version->connect(@{$self->storage->connect_info()});
   my $vtable = $self->{vschema}->resultset('Table');
 
+  # useful when connecting from scripts etc
+  return if ($args->{ignore_version} || ($ENV{DBIC_NO_VERSION_CHECK} && !exists $args->{ignore_version}));
+
   # check for legacy versions table and move to new if exists
   my $vschema_compat = DBIx::Class::VersionCompat->connect(@{$self->storage->connect_info()});
   unless ($self->_source_exists($vtable)) {