Fix false negatives in lean_startup.t
[dbsrgits/DBIx-Class.git] / examples / Schema / insertdb.pl
index c57460e..4fb22fa 100755 (executable)
@@ -4,9 +4,9 @@ use strict;
 use warnings;
 
 use MyApp::Schema;
+use DBIx::Class::_Util 'parent_dir';
 
-use Path::Class 'file';
-my $db_fn = file($INC{'MyApp/Schema.pm'})->dir->parent->file('db/example.db');
+my $db_fn = parent_dir( $INC{'MyApp/Schema.pm'} ) . '../db/example.db';
 
 my $schema = MyApp::Schema->connect("dbi:SQLite:$db_fn");
 
@@ -31,7 +31,7 @@ foreach my $lp (keys %albums) {
 }
 
 $schema->populate('Cd', [
-    [qw/title artist/],
+    [qw/title artistid/],
     @cds,
 ]);
 
@@ -55,6 +55,6 @@ foreach my $track (keys %tracks) {
 }
 
 $schema->populate('Track',[
-    [qw/cd title/],
+    [qw/cdid title/],
     @tracks,
 ]);