Question

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

Was it helpful?

Solution

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?

OTHER TIPS

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.

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 :(

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top