Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # ... this sets up db with some data for our tests
- my $dbh = DBI->connect("dbi:SQLite:dbname=:memory:");
- $dbh->do('create table user (name varchar(100) primary key, age int)');
- # .... congfigure plugin to point to a :memory: db
- set plugins => { DBIC => { foo => { dsn => "dbi:SQLite:dbname=:memory:" } } };
- #Now when you grab a schema object via schema('foo'), this does not refer to
- #the db created first via DBI. It will refer to a brand new :memory: db.
- #That's my understanding at least. And it's even worse when you want to
- #test multiple schemas.
Add Comment
Please, Sign In to add comment