perlpod:缺少文本问题

发布于 2024-12-20 17:37:41 字数 2171 浏览 0 评论 0原文

我遇到了 pod2usage 缺少文本的问题,我尝试通过以下方式修复它:

  1. 转换换行符
  2. 重写它
  3. 使用 podchecker 检查它

但这些都无法帮助解决或提示我的问题

podchecker 的输出:

YaTC.pod pod syntax OK.

完整的 pod:

http://pastebin.com/igH8SamN

Pod2text 输出:

截图

Bool: Use special characters

    If Nth = 0, this is the left arrow
Data: ISO Language Code:



    * Missing data *


    <http://www.w3schools.com/tags/ref_language_codes.asp?output=print>
    <http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>
Data: Main size:

* Missing data *


    Maximum size limit, where Nth = 0 if X axis
Data: Minimum size:

截图

信息:

我的操作系统是 OpenSuSE 11.4 Linux 2.6.37.6-0.7-default i686 i686 i386,GNU/Linux

我的编辑器是 SciTE Version 1.77

另外 POD 嵌入在 Perl 代码中,并通过以下代码调用 pod2text: >

    if ( !$conf{'Bool_Use_plain_text_for_help'} ) {
    my $help = $helpframe->PodText(
        -scrollbars => '',
        -file       => $0,
        -wrap       => 'word',
        -background => 'white',
        -width      => 150,
        -height     => 500
    )->pack( -side => 'top', -fill => 'both', -expand => 1 );
}
else {
    my $help = $helpframe->Text(
        -wrap       => 'word',
        -background => 'white',
        -width      => 150,
        -height     => 500
    )->pack( -side => 'top', -fill => 'both', -expand => 1 );

    $help->insert( 'end', qx{pod2text '$0'} );
}

Pod2text 版本: 未知(不在 maninfohelppod2text 中 - -帮助 )

终端信息:

TERM=xterm
COLORTERM=1

编辑: 这个 bug 似乎源于 Tk::Text,我在控制台中尝试了 pod2html,看起来没问题,但在 Tk 中缺少文本

I'm having a issue where pod2usage is missing text, and I have tried to fix it by:

  1. converting newlines
  2. rewriting it
  3. checking it with podchecker

but none of these things help to resolve or hint to my problem

output of podchecker:

YaTC.pod pod syntax OK.

Full pod:

http://pastebin.com/igH8SamN

Pod2text output:

snip

Bool: Use special characters

    If Nth = 0, this is the left arrow
Data: ISO Language Code:



    * Missing data *


    <http://www.w3schools.com/tags/ref_language_codes.asp?output=print>
    <http://en.wikipedia.org/wiki/List_of_ISO_639-1_codes>
Data: Main size:

* Missing data *


    Maximum size limit, where Nth = 0 if X axis
Data: Minimum size:

snip

Info:

My OS is OpenSuSE 11.4 Linux 2.6.37.6-0.7-default i686 i686 i386, GNU/Linux

My editor is SciTE Version 1.77

Also The POD is embedded in Perl code and pod2text is called thru the following code:

    if ( !$conf{'Bool_Use_plain_text_for_help'} ) {
    my $help = $helpframe->PodText(
        -scrollbars => '',
        -file       => $0,
        -wrap       => 'word',
        -background => 'white',
        -width      => 150,
        -height     => 500
    )->pack( -side => 'top', -fill => 'both', -expand => 1 );
}
else {
    my $help = $helpframe->Text(
        -wrap       => 'word',
        -background => 'white',
        -width      => 150,
        -height     => 500
    )->pack( -side => 'top', -fill => 'both', -expand => 1 );

    $help->insert( 'end', qx{pod2text '$0'} );
}

Pod2text version: unknown ( not in man, info, help or pod2text --help )

Terminal info:

TERM=xterm
COLORTERM=1

Edit: This bug seems to stem from Tk::Text, I tried pod2html in the console, and it seems ok, but in Tk it is missing text

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

傲世九天 2024-12-27 17:37:41

看起来它正在尝试验证您的 mailto 链接,但该链接绝对无效。如果您想使用 mailto 链接,请确保它们包含至少看起来像有效电子邮件地址的内容。

Looks like it's trying to verify your mailto links, which definitively are not valid. If you want to use mailto links, make sure they contain something that at least looks like a valid email address.

冷情妓 2024-12-27 17:37:41

我刚刚下载了你发布的 Pod,一切似乎都工作正常。我在 Mac 和 Windows XP 机器上使用了 perldocpod2text 命令。两者都生成了正确的 POD,没有任何错误。

我对你的 POD 的唯一问题是它被标记为 Unix 格式,但每行末尾都有 CRLF。我使用 VIM 删除了“CR”字符(它显示为 ^M)。然而,这并没有影响 POD 本身。

我还做了一个 pod2text pod3.txt > pod_text.txt 并检查生成的文本文件。再说一遍,一切看起来都很好。

您还有问题吗?这似乎不是 POD 本身的问题,并且 perldocpod2text 在我的系统上都产生了良好的输出。如果您仍然遇到问题,我想说这取决于:

  • 您的 pod2text 版本。
  • 你的环境。您使用的是 Linux 还是 Windows 计算机(就像我必须询问用户名为 linuxrules49 的人。如果您通过 lessmore 进行管道传输code>,您的 $TERM 环境变量设置为多少?可能是您的终端在通过管道传输到 moreless

另外,您使用什么编辑器放置不需要的内容 您的 POD 中是否有缩进?

I just downloaded the pod you posted, and everything seems to work fine. I used both the perldoc and the pod2text command on my Mac and on a Windows XP box. Both produced the correct POD without any errors.

The only issue I had with your POD is that it was marked as being in Unix format, but it had CRLF on the end of each line. I used VIM to remove the "CR" character (it shows up as ^M). However, that didn't affect the POD itself.

I also did a pod2text pod3.txt > pod_text.txt and examined the resulting text file. Again, everything looks good.

Are you still having a problem? It doesn't appear to be a problem with the POD itself, and both perldoc and pod2text produce good output on my system. If you're still having an issue, I would say it is down to:

  • Your version of pod2text.
  • Your environment. Are you on a Linux or Windows machine (like I have to ask someone who's user name is linuxrules49. If you're piping this through less or more, what is your $TERM environment variable set to? It could be that your terminal is losing lines as it gets piped to either more or less.

Also, what editor are you using where it puts unwanted indents in your POD?

菩提树下叶撕阳。 2024-12-27 17:37:41

关于 David W 的回答中提到的“无法断行”警告,可以通过执行以下操作来避免 pod2usage 烦恼:

  1. 将 URL(或其他有问题的长字符串)放在自己的行上,并在行首添加空格。
  2. 在包含 URL 的行之前放置一个空行。

瞧!

顺便说一句,我会将其作为答案中的评论留下,而不是开始一个全新的答案,但我显然有 代表点不足 :(

Regarding the "can't break line" warning noted in David W's answer, that pod2usage annoyance can be avoided by doing the following:

  1. Put the URL (or other offending long string) on its own line with whitespace at the beginning of the line.
  2. Put a blank line before the line containing the URL.

Voila!

Btw, I would have left this as a comment in the answer rather than starting a whole new answer, but I apparently have insufficient rep points :(

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文