X-Git-Url: https://git.dogcows.com/gitweb?a=blobdiff_plain;f=t%2Flib%2FDBICTest%2FPlain.pm;fp=t%2Flib%2FDBICTest%2FPlain.pm;h=209cc3eb90b626a9da697db0d0a9e7d9827efbf3;hb=584713f437ffa9390821a0580ed368aa22fb552e;hp=0000000000000000000000000000000000000000;hpb=d93b1239cb7de482ac79a091d7daa67115596306;p=chaz%2Fp5-DBIx-Class-ResultSet-RecursiveUpdate diff --git a/t/lib/DBICTest/Plain.pm b/t/lib/DBICTest/Plain.pm new file mode 100644 index 0000000..209cc3e --- /dev/null +++ b/t/lib/DBICTest/Plain.pm @@ -0,0 +1,40 @@ +package # hide from PAUSE + DBICTest::Plain; + +use strict; +use warnings; +use base qw/DBIx::Class::Schema/; +use DBI; + +my $db_file = "t/var/Plain.db"; + +unlink($db_file) if -e $db_file; +unlink($db_file . "-journal") if -e $db_file . "-journal"; +mkdir("t/var") unless -d "t/var"; + +my $dsn = "dbi:SQLite:${db_file}"; + +__PACKAGE__->load_classes("Test"); +my $schema = __PACKAGE__->compose_connection( + __PACKAGE__, + $dsn, + undef, + undef, + { AutoCommit => 1 } +); + +my $dbh = DBI->connect($dsn); + +my $sql = <do($_) for split(/\n\n/, $sql); + +1;