in reply to Re: Escape newlines in POD / (Selectively) don't generate space characters instead
in thread Escape newlines in POD / (Selectively) don't generate space characters instead

Instead of Z<>, you could try Z<< >>. Here's some interim results; I'll leave you to test this with the various pod* programs you've mentioned.

Here's what I get with Z<> (probably much the same as you're seeing):

$ cat test_pod_z.pod =pod Refer to the L<foobar section in the Module::Really::Really::Really::Very::Very::Long documentation|Z< >Module::Really::Really::Really::Very::Very::Long/foobar>. =cut $ perldoc test_pod_z.pod ... Refer to the foobar section in the Module::Really::Really::Really::Very::Very::Long documentation. POD ERRORS Hey! The above document had some coding errors, which are explaine +d below: Around line 4: A non-empty Z<>

Now with Z<< >>. The space before >>Module... is important; without it you'll get a different error.

$ cat test_pod_zz.pod =pod Refer to the L<foobar section in the Module::Really::Really::Really::Very::Very::Long documentation|Z<< >>Module::Really::Really::Really::Very::Very::Long/foobar>. =cut $ perldoc test_pod_zz.pod ... Refer to the foobar section in the Module::Really::Really::Really::Very::Very::Long documentation.

Just for completeness, and because I had it handy, without the space before >>Module...:

Refer to the foobar section in the Module::Really::Really::Really::Very::Very::Long documentation POD ERRORS Hey! The above document had some coding errors, which are explaine +d below: Around line 4: Unterminated L<Z< ... >> sequence A non-empty Z<>

— Ken

  • Comment on Re^2: Escape newlines in POD / (Selectively) don't generate space characters instead (Z<< >>)
  • Select or Download Code

Replies are listed 'Best First'.
Re^3: Escape newlines in POD / (Selectively) don't generate space characters instead (Z<< >>)
by Ionic (Acolyte) on Nov 09, 2020 at 07:00 UTC

    Instead of Z<>, you could try Z<< >>.
    Of course, a very interesting interpretation of "mandatory whitespace" when using repeated angle brackets. :)
    It does seem to let Pod::Man ignore such errors, because whitespace is ignored, but sadly doesn't seem to be a general solution either.

    Example, generated by Pod::Simple::HTML (I have slightly amended the text to include a missing "the"):

    <p>Refer to the <a>foobar section in the Module::Really::Really::Reall +y::Very::Very::Long documentation</a></p>
    While pod2html didn't throw any error, the link is clearly broken (misses a location), and, what isn't immediately seen, any data after the link is missing, too. I.e., the same HTML output is generated by this input:
    =pod Refer to the L<foobar section in the Module::Really::Really::Really::Very::Very::Long documentation|Z<< >>Module::Really::Really::Really::Very::Very::Long/foobar>. asdf fff =cut
    Losing data is bad. :/

      links/urls, they just dont wrap, quit wrapping them, wrap the text