Add explicit AS keyword to RowNum (Oracle) limit dialect
[dbsrgits/DBIx-Class.git] / examples / Schema / testdb.pl
old mode 100644 (file)
new mode 100755 (executable)
index a65db0f..2a1061a
@@ -3,11 +3,14 @@
 use warnings;
 use strict;
 
-use MyDatabase::Main;
+use MyApp::Schema;
+
+use Path::Class 'file';
+my $db_fn = file($INC{'MyApp/Schema.pm'})->dir->parent->file('db/example.db');
 
-my $schema = MyDatabase::Main->connect('dbi:SQLite:db/example.db');
 # for other DSNs, e.g. MySql, see the perldoc for the relevant dbd
 # driver, e.g perldoc L<DBD::mysql>.
+my $schema = MyApp::Schema->connect("dbi:SQLite:$db_fn");
 
 get_tracks_by_cd('Bad');
 get_tracks_by_artist('Michael Jackson');