mod_perl)
- classmetadata template variables can now be overriden individually
- Template toolkit objects are configured with Maypole::Config->view_options
+ - Make test suite work with DBD::SQLite2
2.04 Tue Oct 27 14:00:00 2004
if ( !-e "t/beerdb.db" ) {
print "Making SQLite DB\n";
eval { require DBD::SQLite };
- die "No, wait, we don't have SQLite installed. Never mind\n" if $@;
- require DBI;
- my $dbh = DBI->connect("dbi:SQLite:dbname=t/beerdb.db");
-
+ my $dbh;
+ if ($@) {
+ eval { require DBD::SQLite2 };
+ die "No, wait, we don't have SQLite installed. Never mind\n" if $@;
+ require DBI;
+ $dbh = DBI->connect("dbi:SQLite2:dbname=t/beerdb.db");
+ } else {
+ require DBI;
+ $dbh = DBI->connect("dbi:SQLite:dbname=t/beerdb.db");
+ }
my $sql = join( '', (<DATA>) );
for my $statement ( split /;/, $sql ) {
BEGIN {
# This is the sample application. Change this to the path to your
# database. (or use mysql or something)
-BeerDB->setup("dbi:SQLite:t/beerdb.db");
+eval { require DBD::SQLite };
+if ($@) {
+ BeerDB->setup("dbi:SQLite2:t/beerdb.db");
+} else {
+ BeerDB->setup("dbi:SQLite:t/beerdb.db");
+}
}
# Give it a name.