[英]What is the correct syntax for producing http links with custom text with pod2html?
perlpod
文档告诉我,我可以使用L<scheme:...>
或L<text|scheme:...>
链接到 URL,它甚至列出了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>
要生产。 我怎样才能做到这一点?
更新因此,正如 Alan Haggai Alavi 指出的那样,这似乎是Pod::Html
一个错误。 有解决方法吗?
这确实是Pod::Html
一个错误。 它已在 bleedperl 中修复。
现在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::Html
。
像使用它一样
L<< example|http://example.com/ >>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.