From: Rich Bowen
Date: Tue, 21 Aug 2007 01:44:57 +0000 (+0000)
Subject: Remove the Perl text-to-dbm script, and replace with a reference to the
X-Git-Tag: 2.2.6~140
X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1ab7b13f343d28f94e3bddb8a3d32bedbd78a0c;p=thirdparty%2Fapache%2Fhttpd.git
Remove the Perl text-to-dbm script, and replace with a reference to the
httxt2dbm utility.
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.2.x@567902 13f79535-47bb-0310-9956-ffa450edef68
---
diff --git a/docs/manual/mod/mod_rewrite.html.en b/docs/manual/mod/mod_rewrite.html.en
index c598d72aa71..e770b639518 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 d818c8935b6..ae34070c97b 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