Skip Menu |

This queue is for tickets about the perlindex CPAN distribution.

Report information
The Basics
Id: 4506
Status: resolved
Worked: 1 hour (60 min)
Priority: 0/
Queue: perlindex

People
Owner: Nobody in particular
Requestors: Marek.Rouchal [...] gmx.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 1.301
Fixed in: (no value)



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;
Hello, For the pager thing: Could we simply use the env variable $PAGER instead of resorting to the Config module? For the search path: As it is only required for the index run, I am somewhat reluctant to compute it for evey query. On the other hand we might drop the whole .PL stuff? The whole thing was just a demo to convince Larry to accept "pack 'w'" in the perl core. As he did accept it, maybe I am obliged to maintain it? Ulrich
Applied suggested patch slightly extended.