--- /dev/null
+To use Maypole with mod_perl, you must install libapache2-mod-perl2
+and libapache2-request-perl. You must also enable mod_perl and
+mod_apreq:
+
+ # a2enmod perl
+ # a2enmod apreq
+ # /etc/init.d/apache2 force-reload
+
+ -- Ben Hutchings <ben@decadent.org.uk>, Sun, 16 Sep 2007 19:39:57 +0100
--- /dev/null
+maypole (2.11+2.111-2) unstable; urgency=low
+
+ * Added clone handling to improve compatibility with Apache's
+ multithreaded MPMs (109_handle-clone.diff)
+
+ -- Ben Hutchings <ben@decadent.org.uk> Sun, 16 Sep 2007 23:59:29 +0100
+
+maypole (2.11+2.111-1) unstable; urgency=low
+
+ * New upstream version
+ - Includes templates within examples - closes: #409324
+ * Updated my email address
+ * Removed dependency on libapache-request-perl and recommendation of
+ libapache-mod-perl - closes: #432463
+ * Removed dependency of new upstream version on File::MMagic::XS
+ pending packaging of that (201_no-file-mmagic-xs.diff)
+ * Fixed minimum length of file extension for file type inference
+ (101_fix-extension-mime-type.diff)
+ * Fixed apache_mvc test to work with Apache2 modules
+ (102_fix-apache_mvc-test.diff)
+ * Removed subroutine definition which is replaced at run-time and
+ otherwise results in a warning (103_fix-view_object-warning.diff)
+ * Added watch file
+ * Added md5sums
+ * Updated policy version to 3.7.2 (no other changes required).
+ * Added error propagation through CGI front-end
+ (104_add-cgi-error-status.diff)
+ * Fixed reporting of template warnings (105_dont-use-warn-method.diff)
+ * Fixed method name clash with Class::DBI::mysql
+ (106_fix-_column_info-clash.diff)
+ * Fixed some inconsistencies between examples and tutorial
+ (107_make-examples-consistent.diff)
+ * Fixed generation of some URIs in standard templates (108_fix-uris.diff)
+ * Adjusted examples and tutorial for use in the package
+ (202_fix-example-references.diff)
+ * Added README.Debian explaining use with Debian Apache/mod_perl
+ packages
+
+ -- Ben Hutchings <ben@decadent.org.uk> Sun, 16 Sep 2007 20:12:12 +0100
+
+maypole (2.10-1) unstable; urgency=low
+
+ * Initial release - closes: #345275
+
+ -- Ben Hutchings <ben@decadentplace.org.uk> Sat, 31 Dec 2005 14:55:42 +0000
--- /dev/null
+Source: maypole
+Maintainer: Ben Hutchings <ben@decadent.org.uk>
+Section: perl
+Priority: extra
+Build-Depends: debhelper (>= 5), quilt
+Build-Depends-Indep: perl (>= 5.6.0-16),
+ libclass-dbi-abstractsearch-perl,
+ libclass-dbi-pager-perl,
+ libclass-dbi-plugin-retrieveall-perl,
+ libclass-dbi-loader-relationship-perl,
+ libclass-dbi-perl,
+ libclass-dbi-sqlite-perl,
+ libcgi-untaint-perl (>= 1.26),
+ libcgi-untaint-date-perl,
+ libcgi-untaint-email-perl,
+ libuniversal-moniker-perl,
+ libuniversal-require-perl,
+ liburi-perl,
+ libcgi-simple-perl,
+ libhttp-body-perl,
+ libhtml-tree-perl,
+ libwww-perl,
+ libtemplate-perl,
+ libtemplate-plugin-class-perl,
+ libtest-mockmodule-perl,
+ libdigest-perl,
+ libfile-mmagic-perl,
+ libclass-dbi-plugin-type-perl,
+ libclass-accessor-perl,
+ libclass-data-inheritable-perl,
+ libtest-pod-perl,
+ libtest-pod-coverage-perl,
+ libapache2-request-perl
+Standards-Version: 3.7.2
+
+Package: libmaypole-perl
+Architecture: all
+Depends: ${perl:Depends},
+ libclass-dbi-abstractsearch-perl,
+ libclass-dbi-pager-perl,
+ libclass-dbi-plugin-retrieveall-perl,
+ libclass-dbi-loader-relationship-perl,
+ libclass-dbi-perl,
+ libclass-dbi-sqlite-perl,
+ libcgi-untaint-perl (>= 1.26),
+ libcgi-untaint-date-perl,
+ libcgi-untaint-email-perl,
+ libuniversal-moniker-perl,
+ libuniversal-require-perl,
+ liburi-perl,
+ libcgi-simple-perl,
+ libhttp-body-perl,
+ libhtml-tree-perl,
+ libwww-perl,
+ libtemplate-perl,
+ libtemplate-plugin-class-perl,
+ libtest-mockmodule-perl,
+ libdigest-perl,
+ libfile-mmagic-perl,
+ libclass-dbi-plugin-type-perl
+Recommends: libapache2-mod-perl2
+Description: Perl framework for MVC-oriented web applications
+ Maypole is a Perl framework for Model/View/Controller-oriented web
+ applications, similar to Jakarta's Struts. Maypole is designed to
+ minimize coding requirements for creating simple web interfaces to
+ databases, while remaining flexible enough to support enterprise web
+ applications.
+ .
+ Homepage: http://maypole.perl.org/
--- /dev/null
+This is the Debian-packaged version of Maypole, put together by Ben
+Hutchings <ben@decadent.org.uk> using source from:
+
+ http://search.cpan.org/~teejay/Maypole/
+
+Copyright 2005-2006 Simon Cozens <simon@simon-cozens.org> et al.
+(See list of authors in `/usr/share/doc/libmaypole-perl/AUTHORS'.)
+
+You may distribute this code under the same terms as Perl itself:
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of either:
+
+ a) the GNU General Public License as published by the Free Software
+ Foundation; either version 1, or (at your option) any later
+ version, or
+
+ b) the "Artistic License" which comes with Perl.
+
+On Debian systems, the complete text of the GNU General Public License
+can be found in `/usr/share/common-licenses/GPL' and the Artistic
+Licence in `/usr/share/common-licenses/Artistic'.
--- /dev/null
+AUTHORS
+ex
+README
--- /dev/null
+--- maypole.orig/lib/Maypole.pm
++++ maypole/lib/Maypole.pm
+@@ -617,7 +617,7 @@
+ sub __get_mime_type {
+ my $self = shift;
+ my $type = 'text/html';
+- if ($self->path =~ m/.*\.(\w{3,4})$/) {
++ if ($self->path =~ m/.*\.(\w{2,4})$/) {
+ $type = $filetypes{$1};
+ } else {
+ my $output = $self->output;
--- /dev/null
+--- maypole.orig/t/apache_mvc.t
++++ maypole/t/apache_mvc.t
+@@ -2,10 +2,13 @@
+ use strict;
+ use Test::More;
+ BEGIN {
+- if (eval { require Apache::Request }) {
++ if (eval { require Apache2::RequestRec }) {
++ $ENV{MOD_PERL_API_VERSION} = 2;
++ plan tests => 3;
++ } elsif (eval { require Apache::Request }) {
+ plan tests => 3;
+ } else {
+- Test::More->import(skip_all =>"Apache::Request is not installed: $@");
++ Test::More->import(skip_all =>"Neither Apache2::RequestRec nor Apache::Request is installed: $@");
+ }
+ }
+
--- /dev/null
+--- maypole.orig/lib/Maypole.pm
++++ maypole/lib/Maypole.pm
+@@ -495,13 +495,6 @@
+ return $self->NEXT::DISTINCT::get_template_root( $r, @_ );
+ }
+
+-sub view_object {
+- my $self = shift;
+- my $r = shift;
+- return $r->parent->view_object if $r->{parent};
+- return $self->NEXT::DISTINCT::view_object( $r, @_ );
+-}
+-
+ # Instead of making plugin authors use the NEXT::DISTINCT hoopla to ensure other
+ # plugins also get to call the hook, we can cycle through the application's
+ # @ISA and call them all here. Doesn't work for setup() though, because it's
--- /dev/null
+--- maypole.orig/lib/CGI/Maypole.pm
++++ maypole/lib/CGI/Maypole.pm
+@@ -57,7 +57,17 @@
+ sub run
+ {
+ my $self = shift;
+- return $self->handler;
++ my $status = $self->handler;
++ if ($status != OK) {
++ print <<EOT;
++Status: 500 Maypole application error
++Content-Type: text/html
++
++<title>Maypole application error</h1>
++<h1>Maypole application error</h1>
++EOT
++ }
++ return $status;
+ }
+
+ =head1 Implementation
--- /dev/null
+--- maypole.orig/lib/Maypole/View/TT.pm
++++ maypole/lib/Maypole/View/TT.pm
+@@ -43,11 +43,11 @@
+ } else {
+ if ($@) {
+ my $error = "fatal error in template '$template_file' : $@\nTT paths : " . join(', ',$self->paths($r)) . "\n";
+- $r->warn($error);
++ warn $error;
+ $r->{error} = $error;
+ } else {
+ my $error = "TT error for template '$template_file'\n" . $self->{tt}->error . "\nTT paths : " . join(', ',$self->paths($r)) . "\n";
+- $r->warn($error);
++ warn $error;
+ $r->{error} = $error;
+ }
+ return ERROR;
+@@ -62,12 +62,12 @@
+ # Need to be very careful here.
+ my $tt = Template->new;
+ unless (ref $r->{config}) {
+- $r->warn("no config for this request");
++ warn "no config for this request";
+ $error .= '<br> There was a problem finding configuration for this request';
+ $r->{config} ||= {};
+ }
+
+- $r->warn("report_error - reporting error to user : $error\n");
++ warn "report_error - reporting error to user : $error\n";
+
+ if ($tt->process(\$error_template,
+ { err_type => $type, error => $error,
--- /dev/null
+--- maypole.orig/lib/Maypole/Model/CDBI.pm
++++ maypole/lib/Maypole/Model/CDBI.pm
+@@ -503,7 +503,7 @@
+
+ # Thanks to dave baird -- form builder for these private functions
+ # sub _column_info {
+-sub _column_info {
++sub _init_column_info {
+ my $self = shift;
+ my $dbh = $self->db_Main;
+
+@@ -615,7 +615,7 @@
+ sub column_type {
+ my $class = shift;
+ my $colname = shift or die "Need a column for column_type";
+- $class->_column_info() unless (ref $class->COLUMN_INFO);
++ $class->_init_column_info() unless (ref $class->COLUMN_INFO);
+
+ if ($class->_isa_class($colname)) {
+ return $class->_isa_class($colname)->column_type($colname);
+@@ -646,7 +646,7 @@
+
+ sub required_columns {
+ my ($class, $columns) = @_;
+- $class->_column_info() unless ref $class->COLUMN_INFO;
++ $class->_init_column_info() unless ref $class->COLUMN_INFO;
+ my $column_info = $class->COLUMN_INFO;
+
+ if ($columns) {
+@@ -683,7 +683,7 @@
+ sub column_required {
+ my ($class, $colname) = @_;
+ $colname or $class->_croak( "Need a column for column_nullable" );
+- $class->_column_info() unless ref $class->COLUMN_INFO;
++ $class->_init_column_info() unless ref $class->COLUMN_INFO;
+ if ($class->_isa_class($colname)) {
+ return $class->_isa_class($colname)->column_required($colname);
+ }
+@@ -714,7 +714,7 @@
+ my $class = shift;
+ my $colname = shift or $class->_croak( "Need a column for column_nullable" );
+
+- $class->_column_info() unless ref $class->COLUMN_INFO;
++ $class->_init_column_info() unless ref $class->COLUMN_INFO;
+ if ($class->_isa_class($colname)) {
+ return $class->_isa_class($colname)->column_nullable($colname);
+ }
+@@ -737,7 +737,7 @@
+ sub column_default {
+ my $class = shift;
+ my $colname = shift or $class->_croak( "Need a column for column_default");
+- $class->_column_info() unless (ref $class->COLUMN_INFO);
++ $class->_init_column_info() unless (ref $class->COLUMN_INFO);
+ if ($class->_isa_class($colname)) {
+ return $class->_isa_class($colname)->column_default($colname);
+ }
+@@ -770,7 +770,7 @@
+ $res{moniker} = $class->moniker;
+ $res{plural} = $class->plural_moniker;
+ $res{table} = $class->table;
+- $res{column_metadata} = (ref $class->COLUMN_INFO) ? $class->COLUMN_INFO : $class->_column_info() ;
++ $res{column_metadata} = (ref $class->COLUMN_INFO) ? $class->COLUMN_INFO : $class->_init_column_info() ;
+ return \%res;
+ }
+
--- /dev/null
+--- trunk.orig/ex/fancy_example/BeerDB.pm
++++ trunk/ex/fancy_example/BeerDB.pm
+@@ -6,11 +6,23 @@
+ # This is the sample application. Change this to the path to your
+ # database. (or use mysql or something)
+ use constant DBI_DRIVER => 'SQLite';
+-use constant DATASOURCE => '/home/peter/Desktop/maypolebeer/beerdb';
++use constant DATASOURCE => $ENV{BEERDB_DATASOURCE} || 't/beerdb.db';
+
+ BeerDB->config->model('BeerDB::Base');
+
+-BeerDB->setup("dbi:mysql:beerdb",'root', '');
++BEGIN {
++ 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
++ unless -e DATASOURCE;
++ eval "require DBD::SQLite";
++ if ($@) {
++ eval "require DBD::SQLite2" and $dbi_driver = 'SQLite2';
++ }
++ }
++ BeerDB->setup(join ':', "dbi", $dbi_driver, DATASOURCE);
++}
+
+ # Give it a name.
+ BeerDB->config->application_name('The Beer Database');
+@@ -20,7 +32,7 @@
+
+ # Change this to the htdoc root for your maypole application.
+
+-my @root= ('/home/peter/Desktop/maypolebeer/templates');
++my @root= ('t/templates');
+ push @root,$ENV{BEERDB_TEMPLATE_ROOT} if ($ENV{BEERDB_TEMPLATE_ROOT});
+ BeerDB->config->template_root( [@root] );
+ # Specify the rows per page in search results, lists, etc : 10 is a nice round number
+@@ -37,7 +49,7 @@
+ 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/],
++ printable => [qw/abv name price notes url/],
+ integer => [qw/style brewery score/],
+ date =>[ qw/tasted/],
+ );
+@@ -47,7 +59,7 @@
+
+
+ # Required Fields
+-BeerDB->config->{brewery}{required_cols} = [qw/name url/];
++BeerDB->config->{brewery}{required_cols} = [qw/name/];
+ BeerDB->config->{style}{required_cols} = [qw/name/];
+ BeerDB->config->{beer}{required_cols} = [qw/brewery name price/];
+ BeerDB->config->{pub}{required_cols} = [qw/name/];
+@@ -67,7 +79,7 @@
+
+ # For testing classmetadata
+ #sub BeerDB::Beer::classdata :Exported {};
+-sub BeerDB::Beer::list_columns { return qw/score name price style brewery/};
++sub BeerDB::Beer::list_columns { return qw/score name price style brewery url/};
+
+ sub BeerDB::Handpump::stringify_self {
+ my $self = shift;
+--- trunk.orig/ex/fancy_example/beerdb.sql
++++ trunk/ex/fancy_example/beerdb.sql
+@@ -1,27 +1,28 @@
+ CREATE TABLE style (
+- id integer primary key auto_increment,
++ id integer not null primary key auto_increment,
+ name varchar(60),
+ notes text
+ );
+
+ CREATE TABLE pub (
+- id integer primary key auto_increment,
++ id integer not null primary key auto_increment,
+ name varchar(60),
+ url varchar(120),
+ notes text
+ );
+
+ CREATE TABLE handpump (
+- id integer primary key auto_increment,
++ id integer not null primary key auto_increment,
+ beer integer,
+ pub integer
+ );
+
+ CREATE TABLE beer (
+- id integer primary key auto_increment,
++ id integer not null primary key auto_increment,
+ brewery integer,
+ style integer,
+ name varchar(30),
++ url varchar(120),
+ score integer(2),
+ price varchar(12),
+ abv varchar(10),
+@@ -30,7 +31,7 @@
+ );
+
+ CREATE TABLE brewery (
+- id integer primary key auto_increment,
++ id integer not null primary key auto_increment,
+ name varchar(30),
+ url varchar(50),
+ notes text
+--- trunk.orig/lib/Maypole/Manual/About.pod
++++ trunk/lib/Maypole/Manual/About.pod
+@@ -119,7 +119,8 @@
+ score integer(2),
+ price varchar(12),
+ abv varchar(10),
+- notes text
++ notes text,
++ tasted date
+ );
+
+ create table handpump (
+--- trunk.orig/ex/beerdb.sql
++++ trunk/ex/beerdb.sql
+@@ -1,24 +1,24 @@
+ CREATE TABLE style (
+- id integer primary key auto_increment,
++ id integer not null primary key auto_increment,
+ name varchar(60),
+ notes text
+ );
+
+ CREATE TABLE pub (
+- id integer primary key auto_increment,
++ id integer not null primary key auto_increment,
+ name varchar(60),
+ url varchar(120),
+ notes text
+ );
+
+ CREATE TABLE handpump (
+- id integer primary key auto_increment,
++ id integer not null primary key auto_increment,
+ beer integer,
+ pub integer
+ );
+
+ CREATE TABLE beer (
+- id integer primary key auto_increment,
++ id integer not null primary key auto_increment,
+ brewery integer,
+ style integer,
+ name varchar(30),
+@@ -31,7 +31,7 @@
+ );
+
+ CREATE TABLE brewery (
+- id integer primary key auto_increment,
++ id integer not null primary key auto_increment,
+ name varchar(30),
+ url varchar(50),
+ notes text
--- /dev/null
+--- trunk.orig/lib/Maypole/templates/factory/macros
++++ trunk/lib/Maypole/templates/factory/macros
+@@ -14,7 +14,7 @@
+ [%
+ MACRO link(table, command, additional, label) BLOCK;
+ SET lnk = base _ "/" _ table _ "/" _ command _ "/" _ additional;
+- lnk = lnk | uri ;
++ lnk = lnk | html ;
+ '<a href="' _ lnk _ '">';
+ label | html;
+ "</a>";
+--- trunk.orig/lib/Maypole/templates/factory/header
++++ trunk/lib/Maypole/templates/factory/header
+@@ -10,7 +10,7 @@
+ </title>
+ <meta http-equiv="Content-Type" content="text/html; charset=[% request.document_encoding %]" />
+ <base href="[% config.uri_base%]"/>
+- <link title="Maypole" href="[% config.uri_base %]/maypole.css" type="text/css" rel="stylesheet" />
++ <link title="Maypole" href="[% base %]/maypole.css" type="text/css" rel="stylesheet" />
+ </head>
+ <body>
+ <div class="content">
--- /dev/null
+--- trunk.orig/lib/Maypole/Model/Base.pm
++++ trunk/lib/Maypole/Model/Base.pm
+@@ -12,14 +12,23 @@
+ shift; # class name not used
+ my ($coderef, @attrs) = @_;
+
+- $remember{$coderef} = \@attrs;
++ $remember{$coderef} = [$coderef, \@attrs];
+
+ # previous version took care to return an empty array, not sure why,
+ # but shall cargo cult it until know better
+ return;
+ }
+
+-sub FETCH_CODE_ATTRIBUTES { @{ $remember{$_[1]} || [] } }
++sub FETCH_CODE_ATTRIBUTES { @{ $remember{$_[1]}->[1] || [] } }
++
++sub CLONE {
++ # re-hash %remember
++ for my $key (keys %remember) {
++ my $value = delete $remember{$key};
++ $key = $value->[0];
++ $remember{$key} = $value;
++ }
++}
+
+ sub process {
+ my ( $class, $r ) = @_;
--- /dev/null
+--- maypole.orig/lib/Maypole.pm
++++ maypole/lib/Maypole.pm
+@@ -10,10 +10,10 @@
+ use URI();
+ use URI::QueryParam;
+ use NEXT;
+-use File::MMagic::XS qw(:compat);
++use File::MMagic;
+
+ our $VERSION = '2.111';
+-our $mmagic = File::MMagic::XS->new();
++our $mmagic = File::MMagic->new();
+
+ # proposed privacy conventions:
+ # - no leading underscore - public to custom application code and plugins
+--- maypole.orig/Makefile.PL
++++ maypole/Makefile.PL
+@@ -29,7 +29,7 @@
+ Template::Plugin::Class => 0,
+ Test::MockModule => 0,
+ Digest::MD5 => 0,
+- File::MMagic::XS => 0.08,
++ File::MMagic => 1.21,
+ Class::DBI::Plugin::Type => 0,
+ }, # e.g., Module::Name => 1.1
+ (
--- /dev/null
+--- trunk.orig/ex/BeerDB.pm
++++ trunk/ex/BeerDB.pm
+@@ -13,7 +13,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";
+ if ($@) {
+@@ -31,8 +31,10 @@
+
+ # 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;
++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/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/ex/fancy_example/BeerDB.pm
++++ trunk/ex/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";
+ if ($@) {
+@@ -32,8 +32,11 @@
+
+ # 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;
++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'
++ 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 @@
+ notes text
+ );
+
+-If you have C<DBD::SQLite> available, then a database like this will
+-be created when Maypole was installed. Let's now see how to set it up
+-with a web interface.
+-
+ =head2 Setting up Maypole
+
+ The first thing we need for a Maypole interface to a database is to
+ have a database. If you don't have one, now would be a good time to
+-create one, using the schema above. If you're creating a database
++create one, using the schema in
++F</usr/share/doc/libmaypole-perl/ex/beerdb.sql> (similar to the
++above). To use it with SQLite you must change C<auto_increment> to
++C<autoincrement>; with PostgreSQL you must use C<serial>.
++If you're creating a database
+ 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 @@
+ "a pub has beers on handpumps");
+ 1;
+
+-There's a version of this program in the F<ex/> 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
++C<BeerDB> application. To set it up as a mod_perl handler:
++
++=over
++
++=item *
++Copy F<BeerDB.pm> and the F<BeerDB/> directory into
++F</usr/local/lib/perl/C<$version>/> or F</usr/local/lib/site_perl/>
++
++=item *
++Set the database path in F<BeerDB.pm>
++
++=item *
++Add the following to the Apache configuration:
+
+ <Location /beerdb>
+ SetHandler perl-script
+ PerlHandler BeerDB
+ </Location>
+
++=back
++
+ 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 @@
+
+ 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.
+-We're going to copy
+-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/>
++directory.
+
+ And that's it. We should now be able to go to C<http://localhost/beerdb/>
+ or C<http://localhost/cgi-bin/beer.cgi/>
--- /dev/null
+101_fix-extension-mime-type.diff
+102_fix-apache_mvc-test.diff
+103_fix-view_object-warning.diff
+104_add-cgi-error-status.diff
+105_dont-use-warn-method.diff
+106_fix-_column_info-clash.diff
+107_make-examples-consistent.diff
+108_fix-uris.diff
+109_handle-clone.diff
+201_no-file-mmagic-xs.diff
+202_fix-example-references.diff
--- /dev/null
+#!/usr/bin/make -f
+
+include /usr/share/quilt/quilt.make
+
+build : build-stamp
+
+build-stamp : Makefile.PL $(QUILT_STAMPFN)
+ perl Makefile.PL INSTALLDIRS=vendor
+ $(MAKE) test
+ touch build-stamp
+
+binary : binary-arch binary-indep
+
+binary-arch :
+
+binary-indep : build-stamp
+ dh_testroot
+ $(MAKE) PREFIX=$(CURDIR)/debian/libmaypole-perl/usr install
+ dh_perl
+ dh_installchangelogs Changes
+ dh_installdocs
+ mv debian/libmaypole-perl/usr/share/perl5/Maypole/templates \
+ debian/libmaypole-perl/usr/share/doc/libmaypole-perl/templates
+ mkdir debian/libmaypole-perl/usr/share/doc/libmaypole-perl/ex/templates
+ mv debian/libmaypole-perl/usr/share/doc/libmaypole-perl/templates/beer \
+ debian/libmaypole-perl/usr/share/doc/libmaypole-perl/ex/templates/custom
+ ln -s ../../templates/factory \
+ debian/libmaypole-perl/usr/share/doc/libmaypole-perl/ex/templates/factory
+ ln -s ../../../templates/factory \
+ debian/libmaypole-perl/usr/share/doc/libmaypole-perl/ex/fancy_example/templates/factory
+ dh_compress -X/ex/ -X/templates/
+ dh_fixperms
+ dh_gencontrol
+ dh_md5sums
+ dh_builddeb
+
+clean : unpatch
+ if [ -f Makefile ]; then $(MAKE) clean; fi
+ dh_clean Makefile Makefile.old build-stamp
+
+.PHONY : build binary binary-arch binary-dep clean patch unpatch
--- /dev/null
+version=3
+# Versions appear to be decimal, so when there are three digits in the
+# minor number prepend the version truncated to two minor digits.
+# Change pre-release versions to Debian format.
+opts="uversionmangle=s/^(\d+\.\d\d)\d(?:_|$)/$1+$&/; s/_pre/~pre/" \
+http://search.cpan.org/~teejay/Maypole/ \
+/CPAN/authors/id/T/TE/TEEJAY/Maypole-([\w.]+)\.tar\.gz