Fix borked example
Peter Rabbitson [Fri, 11 Sep 2009 22:58:21 +0000 (22:58 +0000)]
examples/Schema/insertdb.pl

index e8603bb..67a432f 100644 (file)
@@ -47,10 +47,10 @@ my %tracks = (
 
 my @tracks;
 foreach my $track (keys %tracks) {
-    my $cdname = $schema->resultset('Cd')->search({
+    my $cd = $schema->resultset('Cd')->find({
         title => $tracks{$track},
     });
-    push @tracks, [$cdname->first, $track];
+    push @tracks, [$cd->id, $track];
 }
 
 $schema->populate('Track',[