-Changes
MANIFEST
-Makefile.PL
-README
-lib/Apache/MVC.pm
+Changes
+lib/Apache/MVC/Model/Base.pm
+lib/Apache/MVC/Model/CDBI.pm
lib/Apache/MVC/Workflow.pod
+lib/Apache/MVC/View/TT.pm
+lib/Apache/MVC.pm
+lib/BeerDB.pm
t/1.t
+Makefile.PL
+README
+templates/beer/addnew
+templates/custom/header
+templates/custom/frontpage
+templates/factory/macros
+templates/factory/addnew
+templates/factory/header
+templates/factory/list
+templates/factory/search_form
+templates/factory/navbar
+templates/factory/edit
+templates/factory/view
+TODO
package BeerDB;
use base 'Apache::MVC';
-sub handler { Apache::MVC::handler("BeerDB", @_) }
-BeerDB->set_database("dbi:mysql:beerdb");
-BeerDB->config->{uri_base} = "http://neo.trinity-house.org.uk/beerdb/";
+use Class::DBI::Loader::Relationship;
+# This line is required if you don't have Apache calling Perl handlers
+# as methods.
+sub handler { Apache::MVC::handler(__PACKAGE__, @_) }
+
+# This is the sample application. Change this to the path to your
+# database. (or use mysql or something)
+BeerDB->set_database("dbi:SQLite:t/beerdb.db");
+# Change this to the root of the web space.
+BeerDB->config->{uri_base} = "http://localhost/beerdb/";
+
+# Handpumps should not show up.
BeerDB->config->{display_tables} = [qw[beer brewery pub style]];
BeerDB::Brewery->untaint_columns( printable => [qw/name notes url/] );
BeerDB::Beer->untaint_columns(
integer => [qw/style brewery/],
date =>[ qw/date/],
);
-use Class::DBI::Loader::Relationship;
BeerDB->config->{loader}->relationship($_) for (
"a brewery produces beers",
"a style defines beers",