perldoc -f 用于搜perl内置的函数
perldoc -q 用于在perldoc中进行标题的全文检索
Marcin Gryszkalis 写道:
> Hi
>
> I like you script and I added little fix to make it try additional
> perldoc forms (with -f and -q switch). I know that funciotns are
> available at perlfunc page (and faqs at perlfaqX) but perlfun is pretty
> big page so it takes some time to render (and you still have tearch in
> the page for specific function). The fix chenges getPerldocPage to
> something like (It assumes that perldoc returns nonzero value when
> nothing's found - it seems to be true in all systems I tested).
>
> function getPerldocPage ($parameter) {
> exec("perldoc ".escapeshellarg($parameter), $lines, $returncode);
> if ($returncode == 0) return formatManPerlDoc($lines, "perldoc");
> exec("perldoc -f ".escapeshellarg($parameter), $lines, $returncode);
> if ($returncode == 0) return formatManPerlDoc($lines, "perldoc");
> exec("perldoc -q ".escapeshellarg($parameter), $lines, $returncode);
> if ($returncode == 0) return formatManPerlDoc($lines, "perldoc");
> return "";
> }
>
> regards
>
版权声明:可以转载,转载时请务必以超链接形式标明文章 给phpMan加上perldoc -f / -q模式 的原始出处和作者信息及 本版权声明。
http://www.chedong.com/blog/archives/001087.html
博客提及Java,重点介绍了Perl的文档查询功能。如perldoc -f用于搜索Perl内置函数,perldoc -q用于在perldoc中进行标题的全文检索,还给出了修改后的getPerldocPage函数示例,用于更高效查询Perl文档。


被折叠的 条评论
为什么被折叠?



