I'm trying to write a long link in POD syntax that needs (or at least is supposed) to be broken among multiple lines. Doing so, I noticed that perlpod seems to generally replace newlines with space characters (sometimes even multiple ones).

Example:

Refer to the L<foobar section in the Module::Really::Really::Really::Very::Very::Long documentation| Module::Really::Really::Really::Very::Very::Long/foobar>.

Now, the problem with that formatting is that, e.g., pod2html will error out because it cannot generate a reference to " Module::Really::Really::Really::Very::Very::Long" (mind the preceding whitespace).

I know that this problem can be worked around (mostly) by reformatting it so that the separator is not followed by a newline, but that's not a good general solution (and could be made moot by using an ever longer module name that exceeds the line limit and hence needs to be split up anyway).

Another instantiation of this issue can be seen here:

This is a sentence. It's ending here, but the paragraph continues. This is another sentence.

When rendering this with pod2man, it will generate one space character between sentence. and It's, but two(!) space characters between continues. and This. I don't want this to happen. Some people might argue that using a double space character after a punctuation character is sane and actually the way to go, but the argument is pretty much made moot by the introduced inconsistency - the pod2man generator doesn't handle "normal" textual punctuation characters in the same way, so you're ending up with a pretty wild mess.

Is there any way to actually escape newlines such that perlpod does not generate space characters instead? I've tried playing around with the usual methods, but so far couldn't find any.


In reply to Escape newlines in POD / (Selectively) don't generate space characters instead by Ionic

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.