Subject: | fix for limited search path in perlindex |
The attached diff contains two change proposals:
1. The "pager" is different on the two platforms I have to
maintain, but perlindex is a script which is shared between
the platforms. Therefore I suggest to "use Config" dynamically
and get the pager each time perlindex is run. I think the
performance penalty is small.
2. The search paths do not contain the architecture-specific ones,
and do not contain the scripts. The patch build the path
dynamically from $Config{installarchlib} etc., so that all
modules are found.
Keep up the good work!
Cheers,
Marek
diff -ruN perlindex-1.301/perlindex.PL perlindex-1.301.p1/perlindex.PL
--- perlindex-1.301/perlindex.PL 2003-06-18 20:07:33.000000000 +0200
+++ perlindex-1.301.p1/perlindex.PL 2003-11-27 10:05:36.000000000 +0100
@@ -65,6 +65,7 @@
use Getopt::Long;
use File::Basename;
use Text::English;
+use Config;
# NDBM_File as LAST resort
package AnyDBM_File;
@@ -86,29 +87,11 @@
print OUT "\$p = 'S'; # change to 'I' for large collections\n";
}
-$pager= $Config{'pager'};
-if ($Config{'osname'} eq 'hpux') {
- $pager= "col | $pager";
-}
print OUT <<"EOC";
\$nroff = \'$Config{'nroff'}\';
\$man1direxp = \'$Config{'man1direxp'}\';
\$man3direxp = \'$Config{'man3direxp'}\';
-\@perllib = \'$Config{'installprivlib'}\';
-EOC
-if (index($Config{'installsitelib'}, $Config{'installprivlib'}) != 0) {
- print OUT <<"EOC";
-push \@perllib,\'$Config{'installsitelib'}\';
-EOC
-}
-if ($Config{'installvendorlib'} && index($Config{'installvendorlib'}, $Config{'installprivlib'}) != 0) {
- print OUT <<"EOC";
-push \@perllib,\'$Config{'installvendorlib'}\';
-EOC
-}
-print OUT <<"EOC";
\$prefix = \'$Config{'prefix'}\';
-\$pager = \'$pager\';
EOC
;
@@ -138,6 +121,14 @@
print OUT <<'!NO!SUBS!';
+$pager= $Config{'pager'};
+if ($Config{'osname'} eq 'hpux') {
+ $pager= "col | $pager";
+}
+
+@perllib = grep(length && -d && !$seen{$_}++,
+ @Config{qw(installprivlib installarchlib installsitelib installvendorlib installscript installsitearch)});
+
$stemmer = \&Text::English::stem;
# directory for the index
$IDIR = $man1direxp;