From: Simon Cozens Date: Thu, 25 Mar 2004 12:38:36 +0000 (+0000) Subject: Fixes for rollout. X-Git-Tag: 2.10~270 X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=c1341d0f05de751f1dd2e70b24caf0a7aa5866e1;p=maypole.git Fixes for rollout. git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@92 48953598-375a-da11-a14b-00016c27c3ee --- diff --git a/Changes b/Changes index 64431d3..1c94374 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,17 @@ Revision history for Perl extension Maypole +1.2 Thu Mar 25 12:35:21 GMT 2004 + - Ensure safety when dereferencing any ->objects + - Support for the "frontpage" template + - Maypole itself no longer uses ->{ar}, which is now completely + refactored into the Apache::MVC class + - The beginnings of the documentation framework + - Support for paging and ordering in searches + - Stringify column changed from magic "name" to customizable + property + - Move BeerDB to ex/ + - Fix SQLite dependency + 1.1 Wed Feb 25 10:29:25 GMT 2004 - Update CDBIL dependency - Don't stringify to "name" if there isn't one diff --git a/MANIFEST b/MANIFEST index 720f8ff..25d833c 100644 --- a/MANIFEST +++ b/MANIFEST @@ -1,12 +1,21 @@ MANIFEST Changes +doc/About.pod +doc/Beer.pod +doc/Flox.pod +doc/Model.pod +doc/Overview.pod +doc/Request.pod +doc/StandardTemplates.pod +doc/View.pod +doc/makedoc.pl +ex/BeerDB.pm lib/Maypole/Model/Base.pm lib/Maypole/Model/CDBI.pm lib/Maypole/View/TT.pm lib/Maypole/Workflow.pod lib/Maypole.pm lib/Apache/MVC.pm -lib/BeerDB.pm t/1.t Makefile.PL README diff --git a/Makefile.PL b/Makefile.PL index 5223609..16e81ab 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -21,13 +21,13 @@ WriteMakefile( }, # e.g., Module::Name => 1.1 ($] >= 5.005 ? ## Add these new keywords supported since 5.005 (ABSTRACT_FROM => 'lib/Apache/MVC.pm', # retrieve abstract from module - AUTHOR => 'Simon Cozens ') : ()), + AUTHOR => 'Simon Cozens ') : ()), ); if (!-e "t/beerdb.db") { print "Making SQLite DB\n"; - require DBD::SQLite - or die "No, wait, we don't have SQLite installed. Never mind\n"; + eval { require DBD::SQLite }; + die "No, wait, we don't have SQLite installed. Never mind\n" if $@; require DBI; my $dbh = DBI->connect("dbi:SQLite:dbname=t/beerdb.db"); diff --git a/ex/BeerDB.pm b/ex/BeerDB.pm new file mode 100644 index 0000000..b7961bc --- /dev/null +++ b/ex/BeerDB.pm @@ -0,0 +1,29 @@ +package BeerDB; +use base 'Apache::MVC'; +use Class::DBI::Loader::Relationship; + +# 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"); +BeerDB->setup("dbi:mysql:beerdb"); + +# Change this to the root of the web space. +#BeerDB->config->{uri_base} = "http://localhost/beerdb/"; +BeerDB->config->{uri_base} = "http://neo.trinity-house.org.uk/beerdb/"; + +BeerDB->config->{rows_per_page} = 10; + +# Handpumps should not show up. +BeerDB->config->{display_tables} = [qw[beer brewery pub style]]; +BeerDB::Brewery->untaint_columns( printable => [qw/name notes url/] ); +BeerDB::Style->untaint_columns( printable => [qw/name notes/] ); +BeerDB::Beer->untaint_columns( + printable => [qw/abv name price notes/], + integer => [qw/style brewery score/], + date =>[ qw/date/], +); +BeerDB->config->{loader}->relationship($_) for ( + "a brewery produces beers", + "a style defines beers", + "a pub has beers on handpumps"); +1; diff --git a/lib/BeerDB.pm b/lib/BeerDB.pm deleted file mode 100644 index b7961bc..0000000 --- a/lib/BeerDB.pm +++ /dev/null @@ -1,29 +0,0 @@ -package BeerDB; -use base 'Apache::MVC'; -use Class::DBI::Loader::Relationship; - -# 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"); -BeerDB->setup("dbi:mysql:beerdb"); - -# Change this to the root of the web space. -#BeerDB->config->{uri_base} = "http://localhost/beerdb/"; -BeerDB->config->{uri_base} = "http://neo.trinity-house.org.uk/beerdb/"; - -BeerDB->config->{rows_per_page} = 10; - -# Handpumps should not show up. -BeerDB->config->{display_tables} = [qw[beer brewery pub style]]; -BeerDB::Brewery->untaint_columns( printable => [qw/name notes url/] ); -BeerDB::Style->untaint_columns( printable => [qw/name notes/] ); -BeerDB::Beer->untaint_columns( - printable => [qw/abv name price notes/], - integer => [qw/style brewery score/], - date =>[ qw/date/], -); -BeerDB->config->{loader}->relationship($_) for ( - "a brewery produces beers", - "a style defines beers", - "a pub has beers on handpumps"); -1;