---- trunk.orig/ex/BeerDB.pm
-+++ trunk/ex/BeerDB.pm
+--- maypole.orig/examples/BeerDB.pm
++++ maypole/examples/BeerDB.pm
@@ -13,7 +13,7 @@
my $dbi_driver = DBI_DRIVER;
if ($dbi_driver =~ /^SQLite/) {
BeerDB->config->template_root( [@root] );
# Specify the rows per page in search results, lists, etc : 10 is a nice round number
BeerDB->config->rows_per_page(10);
---- trunk.orig/ex/fancy_example/BeerDB.pm
-+++ trunk/ex/fancy_example/BeerDB.pm
+--- maypole.orig/examples/fancy_example/BeerDB.pm
++++ maypole/examples/fancy_example/BeerDB.pm
@@ -14,7 +14,7 @@
my $dbi_driver = DBI_DRIVER;
if ($dbi_driver =~ /^SQLite/) {
- die sprintf "SQLite datasource '%s' not found, correct the path or "
-- . "recreate the database by running Makefile.PL", DATASOURCE
-+ . "recreate the database using beerdb.sql", DATASOURCE
- unless -e DATASOURCE;
- eval "require DBD::SQLite";
+ unless -e (DATASOURCE) {
+- die sprintf("SQLite datasource '%s' not found, correct the path or recreate the database by running Makefile.PL", DATASOURCE), "\n";
++ die sprintf("SQLite datasource '%s' not found, correct the path or recreate the database using beerdb.sql", DATASOURCE), "\n";
+ }
+ eval "require DBD::SQLite";
if ($@) {
-@@ -32,8 +32,11 @@
+@@ -31,8 +31,11 @@
+ BeerDB->config->uri_base( $ENV{BEERDB_BASE} || "http://localhost/beerdb/" );
# Change this to the htdoc root for your maypole application.
-
--my @root= ('t/templates');
--push @root,$ENV{BEERDB_TEMPLATE_ROOT} if ($ENV{BEERDB_TEMPLATE_ROOT});
+-my @root= ('t/templates');
+my @root;
+push @root, 't/templates' if (-d 't/templates');
-+push @root, $ENV{BEERDB_TEMPLATE_ROOT} if ($ENV{BEERDB_TEMPLATE_ROOT});
-+push @root, '/usr/share/doc/libmaypole-perl/ex/fancy_example/templates'
+ push @root,$ENV{BEERDB_TEMPLATE_ROOT} if ($ENV{BEERDB_TEMPLATE_ROOT});
++push @root, '/usr/share/doc/libmaypole-perl/examples/fancy_example/templates'
+ unless @root;
BeerDB->config->template_root( [@root] );
# Specify the rows per page in search results, lists, etc : 10 is a nice round number
BeerDB->config->rows_per_page(10);
---- trunk.orig/lib/Maypole/Manual/About.pod
-+++ trunk/lib/Maypole/Manual/About.pod
-@@ -142,15 +142,15 @@
+--- maypole.orig/lib/Maypole/Manual/About.pod
++++ maypole/lib/Maypole/Manual/About.pod
+@@ -141,15 +141,15 @@
notes text
);
by hand, don't forget to grant permissions for your Apache server to
access it as well as yourself (typically a user name like C<www-data>
or C<wwwrun>).
-@@ -189,17 +189,29 @@
+@@ -188,17 +188,29 @@
"a pub has beers on handpumps");
1;
--There's a version of this program in the F<ex/> directory in the Maypole
+-There's a version of this program in the F<examples/> directory in the Maypole
-files that you downloaded in the F<~root/.cpan/> build area.
-This defines the C<BeerDB> application.
-To set it up as a mod_perl handler, just tell the Apache configuration
-about it:
+There's a version of this program in the
-+F</usr/share/doc/libmaypole-perl/ex/> directory. This defines the
++F</usr/share/doc/libmaypole-perl/examples/> directory. This defines the
+C<BeerDB> application. To set it up as a mod_perl handler:
+
+=over
To use it as a CGI script, put it in your F<cgi-bin> directory,
together with a small file called F<beer.cgi>:
-@@ -215,10 +227,8 @@
+@@ -214,10 +226,8 @@
And now we need some templates. As we'll see in the chapter on
L<views|Maypole::Manual::View>, there are several types of template.
-the whole lot from the F<templates/> directory of the Maypole source
-package into the F</beerdb> directory under our web root.
-Make the C<template_root> in C<BeerDB> agree with your path.
-+These are found in the F</usr/share/doc/libmaypole-perl/ex/templates/>
++These are found in the F</usr/share/doc/libmaypole-perl/examples/templates/>
+directory.
And that's it. We should now be able to go to C<http://localhost/beerdb/>