]> git.decadent.org.uk Git - maypole.git/blobdiff - lib/Maypole/Application.pm
Moved the BeerDB example to Maypole.pm
[maypole.git] / lib / Maypole / Application.pm
index 38b1ec569ee62c46fe87b44cc2e0d86c3a6de04f..6804cdead609ff0eb4e9c1ca8ff05df88dfec155 100644 (file)
@@ -164,49 +164,6 @@ You can specify a higher debug level by saying C<-Debug2> etc.
 
 =back
 
-=head1 BeerDB
-
-The canonical example used in the Maypole documentation is the beer database,
-which starts like this:
-
-    package BeerDB;
-    use strict;
-    use warnings; 
-    
-    # choose a frontend, initialise the config object, and load a plugin
-    use Maypole::Application qw/Relationship/;
-    
-    # get the empty config object created by Maypole::Application
-    my $config = __PACKAGE__->config;
-    
-    # basic settings
-    $config->uri_base("http://localhost/beerdb");
-    $config->template_root("/path/to/templates");
-    $config->rows_per_page(10);
-    $config->display_tables([qw[beer brewery pub style]]);
-
-    # table relationships
-    $config->relationships([
-        "a brewery produces beers",
-        "a style defines beers",
-        "a pub has beers on handpumps",
-        ]);
-        
-    # validation
-    BeerDB::Brewery->untaint_columns( printable => [qw/name notes url/] );
-    BeerDB::Pub->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/],
-    );
-
-    # set everything up
-    __PACKAGE__->setup("dbi:SQLite:t/beerdb.db");
-
-    1;    
-
 =head1 AUTHOR
 
 Sebastian Riedel, C<sri@oook.de>