squash, slight mod to t/100populate.t wip/insert_select
Matt Phillips [Fri, 17 May 2013 20:54:51 +0000 (16:54 -0400)]
t/100populate.t

index 378c398..2af768f 100644 (file)
@@ -447,14 +447,13 @@ lives_ok ( sub {
 
 done_testing;
 
+my $artist_src = $schema->resultset('Artist')->result_source;
+
 my $q = $schema->resultset('CD')->search({}, { columns => [qw/artist year/], group_by => 'artist' })->as_query;
-#p $q;
-#diag Dumper($q);
-#p $schema->resultset('Artist')->result_source;
-#p Dumper $q;
 my $count = 0;
 my $name = "zaaaaa";
-$schema->storage->insert_bulk($schema->resultset('Artist')->result_source, [qw/name rank/], [[[qw/foo 1/], [qw/baz 2/]], sub {
+
+$schema->storage->insert_bulk($artist_src, [qw/name rank/], [[[qw/foo 1/], [qw/baz 2/]], sub {
   return [$name++, ++$count] unless $count > 5;
   return undef;
 }, $q, [[qw/asdf 5/], [qw/uhiuh 6/]]]);