[Bast-commits] r4659 -
DBIx-Class-Fixtures/1.001/trunk/lib/DBIx/Class
lukes at dev.catalyst.perl.org
lukes at dev.catalyst.perl.org
Mon Jul 28 13:46:42 BST 2008
Author: lukes
Date: 2008-07-28 13:46:41 +0100 (Mon, 28 Jul 2008)
New Revision: 4659
Modified:
DBIx-Class-Fixtures/1.001/trunk/lib/DBIx/Class/Fixtures.pm
Log:
doesn't populate if there's nothing to populate
Modified: DBIx-Class-Fixtures/1.001/trunk/lib/DBIx/Class/Fixtures.pm
===================================================================
--- DBIx-Class-Fixtures/1.001/trunk/lib/DBIx/Class/Fixtures.pm 2008-07-26 00:34:55 UTC (rev 4658)
+++ DBIx-Class-Fixtures/1.001/trunk/lib/DBIx/Class/Fixtures.pm 2008-07-28 12:46:41 UTC (rev 4659)
@@ -498,6 +498,7 @@
$config->{rules} ||= {};
my @sources = sort { $a->{class} cmp $b->{class} } @{delete $config->{sets}};
my %options = ( is_root => 1 );
+ $self->{queue} = [];
foreach my $source (@sources) {
# apply rule to set if specified
my $rule = $config->{rules}->{$source->{class}};
@@ -543,6 +544,10 @@
}
}
+ while (my $entry = shift @{$self->{queue}}) {
+ $self->dump_object(@$entry);
+ }
+
foreach my $dir ($output_dir->children) {
next if ($dir eq $tmp_output_dir);
$dir->remove || $dir->rmtree;
@@ -864,7 +869,7 @@
$HASH1 = $fixup_visitor->visit($HASH1) if $fixup_visitor;
push(@rows, $HASH1);
}
- $rs->populate(\@rows);
+ $rs->populate(\@rows) if (scalar(@rows));
}
});
More information about the Bast-commits
mailing list