X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=blobdiff_plain;f=examples%2FSchema%2Finsertdb.pl;h=4fb22fa590b8de3105590e1a9599281bd61103c9;hb=7f068248010455f821c215bf029517cb99aac3e5;hp=c57460e73607453a402425fbfbcff5b80d704fcc;hpb=15ff1933c11adf39cd09114ef0e68e94dd08701f;p=dbsrgits%2FDBIx-Class-Historic.git diff --git a/examples/Schema/insertdb.pl b/examples/Schema/insertdb.pl index c57460e..4fb22fa 100755 --- a/examples/Schema/insertdb.pl +++ b/examples/Schema/insertdb.pl @@ -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, ]);