2 use Maypole::Application qw/-Debug/;
3 use Class::DBI::Loader::Relationship;
6 # This is the sample application. Change this to the path to your
7 # database. (or use mysql or something)
8 BeerDB->setup("dbi:SQLite:t/beerdb.db");
12 BeerDB->config->application_name('The Beer Database');
14 # Change this to the root of the web space.
15 BeerDB->config->uri_base("http://localhost/beerdb/");
16 #BeerDB->config->{uri_base} = "http://neo.trinity-house.org.uk/beerdb/";
18 BeerDB->config->rows_per_page(10);
20 # Handpumps should not show up.
21 BeerDB->config->{display_tables} = [qw[beer brewery pub style]];
22 BeerDB::Brewery->untaint_columns( printable => [qw/name notes url/] );
23 BeerDB::Style->untaint_columns( printable => [qw/name notes/] );
24 BeerDB::Beer->untaint_columns(
25 printable => [qw/abv name price notes url/],
26 integer => [qw/style brewery score/],
29 BeerDB->config->{loader}->relationship($_) for (
30 "a brewery produces beers",
31 "a style defines beers",
32 "a pub has beers on handpumps");
34 # For testing classmetadata
35 sub BeerDB::Beer::classdata :Exported {};
36 sub BeerDB::Beer::list_columns { return qw/score name price style brewery url/};