From cca6bd0ec8ad4f0325eda70b8db2574bf8c77496 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Sat, 31 Jan 2004 19:12:34 +0000 Subject: [PATCH] Update manifest for release and anonymize the example some. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@40 48953598-375a-da11-a14b-00016c27c3ee --- MANIFEST | 24 ++++++++++++++++++++---- lib/BeerDB.pm | 16 ++++++++++++---- 2 files changed, 32 insertions(+), 8 deletions(-) diff --git a/MANIFEST b/MANIFEST index 445c3ba..24e684c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,7 +1,23 @@ -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 diff --git a/lib/BeerDB.pm b/lib/BeerDB.pm index e9f1eb4..23bd39f 100644 --- a/lib/BeerDB.pm +++ b/lib/BeerDB.pm @@ -1,8 +1,17 @@ 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( @@ -10,7 +19,6 @@ 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", -- 2.39.5