Yes, it is villain in by problem. Its hard for me accept this because, I am an eclipse fan. I use eclipse for all my programming needs. If I wanted to do a new thing/language, the first thing I will do is to search for an eclipse plug-in and then start programming with it.

To cut the long story short, this is the point. The pod2html does not work correctly for files edited through eclipse's default editor.

Earlier in my post I was asking if there is a bug in pod2html. I was thinking hard and thinking to the guts of the problem to figure out why I am getting a weird kind of error. The error is like this, I am getting an extraneous =cut in my webpages.

To solve that problem,

Then I concluded that it has something to do with my environment, sever or something. To confirm that notion a final time, I grabbed a standard module from CPAN and ran pod2html on it, hoping to see the =cut statements. No! they did not appear, so again started my quest for the truth.

This time, I did the exact indentation, line gaps, even the decorative lines just like the ones working in the standard module. No use, that did not solve the problem. I became infuriated and finally put the two POD sections, one working and one not working in the same file and ran POD on it. The result, the standard ones is working and mine is not.. ohh noes

Then, I took the next step and edited the standard POD section with the text from my POD. It worked!!!. So this is what it looked like- two paragraphs like this

=head2 usage() blah blah =cut =head2 usage() blah blah =cut

the blah blah is exactly the same letter to letter character to character and one is generating the correctly while the other is not. I could not believe my eyes, I called my co-workers and asked them to check if they are completely similar, they vouched for me. To save my sanity, I thought of just editing the POD from the one which working and pasting it wherever required. This is the worst kind of work around I have ever witnessed.

When I showed this problem to the expert in our group he could believe it. He did a hexdump and could not find any extra characters. To confirm what I am saying he created a new file and about to execute the pod2html, I said confidently, it will not work. But the crazy thing is that it worked. Before my eyes were dazed, the trick striked to me. He was editing in VI not eclipse. Ohh, no this cant be true. I ran to my terminal and edited in VI, sweet - it ran fine without any glitches. So, this is how I came to know that eclipse can sometimes be bad too :(

I wish if someone could verify this for me, because I really dont want to believe this.

Replies are listed 'Best First'.
Re: When eclipse is the Villain
by Joost (Canon) on Jul 01, 2007 at 15:42 UTC
    I'm not going to try to get an eclipse environment configured exactly like yours. Please upload the two files in question and provide a better description of the problem and maybe we can help you.

    Question: do you run pod2html from the command line in both cases or do you start it from eclipse in some way? If you run pod2html exactly the same way on identical files the output should be the same, so either your files are not identical or you're not using the same process to generate html.

      I am using the following command in both the cases
      perltidy -html test.pl -frames
      As you might be already knowing perltidy implicitly calls pod2html. Anyways I tried calling pod2html directly too with no change
      I can paste the code here tomorrow if you want. But as I said in the above post, I have put both the POD sections(with same text) in one script and then ran it to get different results.
Re: When eclipse is the Villain
by GrandFather (Saint) on Jul 01, 2007 at 20:27 UTC

    As suggested elsewhere check for white space. If Eclipse can do it, turn on visible whitespace so you can see where spaces and tabs are. Also check line end characters. You must have blank lines preceding and following POD directives, which includes not having any whitespace characters on the lines.


    DWIM is Perl's answer to Gödel
    A reply falls below the community's threshold of quality. You may see it by logging in.