该L<name>格式代码,您可以设置,如果你链接到其他POD,作为链接显示文本L<Display Text|link_dest>,但这是不允许的L<scheme:...>链接,如
L<http://perldoc.perl.org/strict.html>
Run Code Online (Sandbox Code Playgroud)
如何为此类链接指定显示文本?或者,如何手动编写这样的链接,而角括号不是由HTML授权的pod2html?
正确的格式是这样的:
L<strict|http://perldoc.perl.org/strict.html>
Run Code Online (Sandbox Code Playgroud)
另请参见http://justatheory.com/computers/programming/perl/sane-pod-links.html
http://perldoc.perl.org/perlpod.html#Formatting-Codes
L<<a href="http://www.perl.org/">http://www.perl.org/</a>>
正如您所指出的,看起来这应该可行,但也许我误解了您的问题?
编辑: pod2html 似乎不喜欢这种方法。
我找到了一个稍微复杂一些的解决方案,
https://web.archive.org/web/1/http://blogs.techrepublic%2ecom%2ecom/howdoi/?p=114
#!/usr/bin/perl
use strict;
use warnings;
use Pod::2::html;
my $pod_file = $ARGV[0];
my $template = $ARGV[1];
# Create pod2html object
my $pod = Pod::2::html->new($pod_file);
# The path to the HTML template
$pod->template($template);
# The formatted HTML will go to STDOUT
$pod->readpod();
Run Code Online (Sandbox Code Playgroud)
我对此进行了测试,似乎插入通用 html 没有问题,因此您实际上根本不需要 L<> 标记。这对我来说似乎是一个不错的解决方案。