perl - 使用 pod2html 生成带有自定义文本的 http 链接的正确语法是什么?

标签 perl perl-pod

perlpod文档告诉我,我可以使用链接到 URL L<scheme:...>L<text|scheme:...> ,它甚至列出了 L<The Perl Home Page|http://www.perl.org/>举个例子。

第一个案例对我来说效果很好:pod2html

L<http://example.com/>

进入

<a href="http://example.com/">http://example.com/</a>

但是失败了

L<example|http://example.com/>

刚刚变成

<em>example</em>

伴随着警告:

/usr/bin/pod2html: : cannot resolve L<example|http://example.com/> in paragraph 2.

我本来期望类似的事情

<a href="http://example.com/">example</a>

即将制作。我怎样才能实现这一目标?

更新 所以这似乎是 Pod::Html 中的一个错误正如艾伦·哈盖·阿拉维指出的那样。有解决办法吗?

最佳答案

这确实是 Pod::Html 中的一个错误。 。它已在 bleadperl 中修复。

现在L<example|http://example.com/>转换为 <a href="http://example.com/">example</a> .

Pod::Html 是一个纯 Perl 模块,the files can be copied from bleadperl这将为您提供 1.12 版本。 perlv5.14.2 附带的模块是版本 1.11,并出现此错误。

否则,您可以使用 Pod::Simple::Html 其按预期工作。

关于perl - 使用 pod2html 生成带有自定义文本的 http 链接的正确语法是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/8465807/

相关文章:

linux - 如果 Ubuntu 18.04 上安装了两个 Perl 版本,如何将新的 Perl 版本设置为默认版本?

perl - 有没有办法重用 perlpod 文档中的文本?

perl - Pod::Usage 帮助格式化

perl - 为什么 perldoc 将 'Münster' 评估为 'Muenster'

perl - 修复在 XML::Twig 中使用的 XPath 谓词

string - 我可以在 Perl 5 中为字符串创建文件句柄,我如何在 Perl 6 中做到这一点?

python - 是否可以将 POD(普通旧文档)与 Python 一起使用?

perl - 我可以在 perlpod 文档中嵌入自定义标题吗?

perl - 加载 mod_perl.so 时出错

perl - 我不确定如何将 Perlbrew 与 Catalyst 结合使用