Sun 13 Nov 2011 12:40:11 AM UTC, comment #2:
Thanks for your report and patch!
The change to lexgrog.l seems incorrect to me. It adds code to interpret '\:' as a colon, but '\:' is a groff escape which inserts a zero-width break point, and that should not be treated as a colon by lexgrog. I don't recall ever seeing manual page authors using this as a mistake for ':'; even if they did, groff wouldn't render it the way they wanted anyway.
As for the change to whatis.c, I'm a bit confused. At first sight I thought that it was causing a colon to be treated as a word boundary, which would have been fair enough, but actually this patch does the exact opposite, which feels counterintuitive to me; the colon-separated parts of a Perl module name are different words as far as I'm concerned, at least for the purposes of searching. Also, I'm not quite clear on how you're invoking apropos that triggers this. apropos defaults to -r (--regex), so the functions you're patching in whatis.c should never be called.
I believe you that there is some problem, though (perhaps compounded by openSUSE apparently still using a rather old version of man-db; 2.5.2 dates from May 2008, and I've made ten releases since then, seven of which predate openSUSE 11.4), and I'd like to help track it down. Could you show me the apropos command you're running that demonstrates this problem, and also the full output of the same command with the --debug option added? Also, it would help if you could attach the raw contents of a sample manual page file that you expect to be found by apropos but isn't.
For comparison, on Debian unstable:
$ apropos extutils | head
ExtUtils::CBuilder (3perl) - Compile and link C code for Perl modules
ExtUtils::CBuilder (3pm) - Compile and link C code for Perl modules
ExtUtils::CBuilder::Platform::Windows (3perl) - Builder class for Windows pla...
ExtUtils::CBuilder::Platform::Windows (3pm) - Builder class for Windows platf...
ExtUtils::ParseXS (3perl) - converts Perl XS code into C code
ExtUtils::ParseXS (3pm) - converts Perl XS code into C code
Module::Build::Compat (3perl) - Compatibility with ExtUtils::MakeMaker
Module::Build::Compat (3pm) - Compatibility with ExtUtils::MakeMaker
ExtUtils::Command (3perl) - utilities to replace common UNIX commands in Make...
ExtUtils::Command::MM (3perl) - Commands for the MM's to use in Makefiles
... which seems reasonable enough to this Perl user.
|