perllove has asked for the wisdom of the Perl Monks concerning the following question:

Hi everyone,

I am using Perltidy to create webpages with source and POD in one place. As you might be knowing Perltidy internally uses pod2html for creating the HTML page.

I have code which have several subroutines and I thought of using several POD paragraphs each ending with a =cut. I know that it is not recommended by perl best practices, but I wanted not to write my comments in two ways.

Anyways my problem is everything is running fine and I got the neat looking web pages, but I am getting an extraneous =cut in the web page for the every occurrence of =cut other than the first one.

So does the pod2html does not like more than one =cut statements? Or is this some kind of bug and can any work around be suggested or already exists?

If someone knew of this or have solved this problem, please share your thoughts and suggestions.

  • Comment on Small problem with creating webpages using Perltidy

Replies are listed 'Best First'.
Re: Small problem with creating webpages using Perltidy
by Old_Gray_Bear (Bishop) on Jun 29, 2007 at 16:13 UTC
    Without seeing code, I can only guess -- Do you start each of your POD segments with a =pod directive? It sounds like you have unmatched =cut statements.

    ----
    I Go Back to Sleep, Now.

    OGB

Re: Small problem with creating webpages using Perltidy
by GrandFather (Saint) on Jun 29, 2007 at 20:28 UTC
      I have solved the issue, solution is quite funny. I edited using VI instead of eclipse and magic it worked. I never expected to see this kind of bug.. huh that's life. I have even made hexdump to check any meta characters are being inserted by eclipse.. nothing. I would like to know if anyone knows the reason of this

        I don't "know" what the problem is, but my guess is: look for "blank" lines with spaces or tabs on them and make sure there is no trailing white space on the pod directives (the lines starting with =). You might also check that line endings are consistent (lf, crlf or cr). If your editor has a mode for showing white space and line end characters turn it on.


        DWIM is Perl's answer to Gödel