From 8f41656be4b909d7aa4f680d9853fabea0146074 Mon Sep 17 00:00:00 2001 From: Simon Cozens Date: Thu, 29 Jan 2004 14:10:16 +0000 Subject: [PATCH] Tidy up the Beer database application a little git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@15 48953598-375a-da11-a14b-00016c27c3ee --- lib/BeerDB.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/BeerDB.pm b/lib/BeerDB.pm index afa303e..305aa80 100644 --- a/lib/BeerDB.pm +++ b/lib/BeerDB.pm @@ -3,14 +3,14 @@ package BeerDB; use Apache::MVC; use base 'Apache::MVC'; sub handler { Apache::MVC::handler("BeerDB", @_) } -use Class::DBI::Loader::Relationship; BeerDB->set_database("dbi:mysql:beerdb"); BeerDB->config->{template_root} = "/opt/beer"; BeerDB->config->{uri_base} = "http://neo.trinity-house.org.uk/beerdb/"; -BeerDB::Brewery->columns(Stringify => qw/name/); - -BeerDB->config->{loader}->relationship( "a brewery produces beers" ); -BeerDB->config->{loader}->relationship( "a pub has beers on handpumps"); +use Class::DBI::Loader::Relationship; +BeerDB->config->{loader}->relationship($_) for ( + "a brewery produces beers", + "a beer has a style", + "a pub has beers on handpumps"); 1; -- 2.39.5