X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=ex%2FBeerDB.pm;h=db4ec1c66ce5556790ee37913e90c6187ef71b82;hb=346143529922475f513453053cab4b387ac22b9d;hp=778185a0b7e657336dabe63b8c55a2e7cea3eefa;hpb=3f7c99e168a1d75b133c1e2b25db7b170374d695;p=maypole.git diff --git a/ex/BeerDB.pm b/ex/BeerDB.pm index 778185a..db4ec1c 100644 --- a/ex/BeerDB.pm +++ b/ex/BeerDB.pm @@ -2,12 +2,13 @@ package BeerDB; use Maypole::Application; use Class::DBI::Loader::Relationship; -sub debug { $ENV{BEERDB_DEBUG} } +sub debug { $ENV{BEERDB_DEBUG} || 0 } # This is the sample application. Change this to the path to your # database. (or use mysql or something) use constant DBI_DRIVER => 'SQLite'; use constant DATASOURCE => $ENV{BEERDB_DATASOURCE} || 't/beerdb.db'; + BEGIN { my $dbi_driver = DBI_DRIVER; if ($dbi_driver =~ /^SQLite/) {