From: Tom Bloor Date: Fri, 22 May 2015 14:39:40 +0000 (+0000) Subject: move sorting call outside of transaction call X-Git-Tag: v1.001_031~2^2 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=caafa766124fa3d02fb2103d9e6364048bcb0676;p=dbsrgits%2FDBIx-Class-Fixtures.git move sorting call outside of transaction call --- diff --git a/lib/DBIx/Class/Fixtures.pm b/lib/DBIx/Class/Fixtures.pm index 9f9074a..ca67622 100644 --- a/lib/DBIx/Class/Fixtures.pm +++ b/lib/DBIx/Class/Fixtures.pm @@ -1353,9 +1353,9 @@ sub populate { $fixup_visitor = new Data::Visitor::Callback(%callbacks); } + my @sorted_source_names = $self->_get_sorted_sources( $schema ); $schema->storage->txn_do(sub { $schema->storage->with_deferred_fk_checks(sub { - my @sorted_source_names = $self->_get_sorted_sources( $schema ); foreach my $source (@sorted_source_names) { $self->msg("- adding " . $source); my $rs = $schema->resultset($source);