From ab43f623e41cc5eca8cce561633f60f0f30da9d8 Mon Sep 17 00:00:00 2001
From: Rich Bowen
Date: Tue, 21 Aug 2007 01:36:39 +0000
Subject: [PATCH] Remove the Perl txt-to-dbm translation script, and replace it
with a reference to the httxt2dbm utility.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@567899 13f79535-47bb-0310-9956-ffa450edef68
---
docs/manual/mod/mod_rewrite.html.en | 31 +++-----------------------
docs/manual/mod/mod_rewrite.xml | 34 ++++-------------------------
2 files changed, 7 insertions(+), 58 deletions(-)
diff --git a/docs/manual/mod/mod_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en
index 89d9c91e0d..7207c53f42 100644
--- a/docs/manual/mod/mod_rewrite.html.en
+++ b/docs/manual/mod/mod_rewrite.html.en
@@ -879,37 +879,12 @@ RewriteRule ^/(.*) http://${servers:dynamic}/$1 [P,L]
fast lookups. The type can be sdbm, gdbm, ndbm, or
db depending on compile-time
settings. If the type is omitted, the
- compile-time default will be chosen. You can create such a
- file with any DBM tool or with the following Perl
- script. Be sure to adjust it to create the appropriate
- type of DBM. The example creates an NDBM file.
+ compile-time default will be chosen.
-
-#!/path/to/bin/perl
-##
-## txt2dbm -- convert txt map to dbm format
-##
-
-use NDBM_File;
-use Fcntl;
-
-($txtmap, $dbmmap) = @ARGV;
-
-open(TXT, "<$txtmap") or die "Couldn't open $txtmap!\n";
-tie (%DB, 'NDBM_File', $dbmmap,O_RDWR|O_TRUNC|O_CREAT, 0644)
- or die "Couldn't create $dbmmap!\n";
-
-while (<TXT>) {
- next if (/^\s*#/ or /^\s*$/);
- $DB{$1} = $2 if (/^\s*(\S+)\s+(\S+)/);
-}
-
-untie %DB;
-close(TXT);
-
+ To create a dbm file from a source text file, use the httxt2dbm utility.
-$ txt2dbm map.txt map.db
+$ httxt2dbm -i mapfile.txt -o mapfile.map
diff --git a/docs/manual/mod/mod_rewrite.xml b/docs/manual/mod/mod_rewrite.xml
index 5d3a84519e..6460fe1489 100644
--- a/docs/manual/mod/mod_rewrite.xml
+++ b/docs/manual/mod/mod_rewrite.xml
@@ -409,39 +409,13 @@ RewriteRule ^/(.*) http://${servers:dynamic}/$1 [P,L]
fast lookups. The type can be sdbm, gdbm, ndbm, or
db depending on compile-time
settings. If the type is omitted, the
- compile-time default will be chosen. You can create such a
- file with any DBM tool or with the following Perl
- script. Be sure to adjust it to create the appropriate
- type of DBM. The example creates an NDBM file.
+ compile-time default will be chosen.
-
-
-#!/path/to/bin/perl
-##
-## txt2dbm -- convert txt map to dbm format
-##
-
-use NDBM_File;
-use Fcntl;
-
-($txtmap, $dbmmap) = @ARGV;
-
-open(TXT, "<$txtmap") or die "Couldn't open $txtmap!\n";
-tie (%DB, 'NDBM_File', $dbmmap,O_RDWR|O_TRUNC|O_CREAT, 0644)
- or die "Couldn't create $dbmmap!\n";
-
-while (<TXT>) {
- next if (/^\s*#/ or /^\s*$/);
- $DB{$1} = $2 if (/^\s*(\S+)\s+(\S+)/);
-}
-
-untie %DB;
-close(TXT);
-
-
+ To create a dbm file from a source text file, use the httxt2dbm utility.
-$ txt2dbm map.txt map.db
+$ httxt2dbm -i mapfile.txt -o mapfile.map
--
2.40.0