4

perlpod文档告诉我,我可以使用 or 链接到 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因此,正如 Alan Haggai Alavi 指出的那样,这似乎是一个错误。有解决方法吗?

4

2 回答 2

7

这确实Pod::Html. 它已在 bleadperl 中修复。

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

由于Pod::Html是纯 Perl 模块,因此可以从 bleadperl 复制文件,这将为您提供 1.12 版本。perl v5.14.2附带的模块是 1.11 版,并出现此错误。

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

于 2011-12-11T18:13:23.270 回答
-1

像使用它一样

L<< example|http://example.com/ >>
于 2011-12-11T17:41:20.283 回答