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/) {
integer => [qw/style brewery score/],
date =>[ qw/date/],
);
+BeerDB::Pub->untaint_columns(printable => [qw/name notes url/]);
+
BeerDB->config->{loader}->relationship($_) for (
"a brewery produces beers",
"a style defines beers",