X-Git-Url: https://git.decadent.org.uk/gitweb/?p=maypole.git;a=blobdiff_plain;f=debian%2Fpatches%2F202_fix-example-references.diff;h=88bdefb91d3e59306847bd4225a6dced17d90363;hp=e35ec87611ff2449300f822af28e3a734a9f7ac3;hb=dd425b2cb6384f804cc1eea9e45660ed6baeb2f1;hpb=fadcae3ffddebaa38da172f9624cc60176d80b33 diff --git a/debian/patches/202_fix-example-references.diff b/debian/patches/202_fix-example-references.diff index e35ec87..88bdefb 100644 --- a/debian/patches/202_fix-example-references.diff +++ b/debian/patches/202_fix-example-references.diff @@ -1,5 +1,5 @@ ---- 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/) { @@ -22,34 +22,33 @@ 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 ); @@ -70,17 +69,17 @@ 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 or C). -@@ -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 directory in the Maypole +-There's a version of this program in the F directory in the Maypole -files that you downloaded in the F<~root/.cpan/> build area. -This defines the C 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 directory. This defines the ++F directory. This defines the +C application. To set it up as a mod_perl handler: + +=over @@ -105,7 +104,7 @@ To use it as a CGI script, put it in your F directory, together with a small file called F: -@@ -215,10 +227,8 @@ +@@ -214,10 +226,8 @@ And now we need some templates. As we'll see in the chapter on L, there are several types of template. @@ -113,7 +112,7 @@ -the whole lot from the F directory of the Maypole source -package into the F directory under our web root. -Make the C in C agree with your path. -+These are found in the F ++These are found in the F +directory. And that's it. We should now be able to go to C