tachyon has asked for the wisdom of the Perl Monks concerning the following question:
I wrote a little script for my home site at perlmonk.org to automatically pod2html my public scripts and modules, write the index pages, etc. Just another day in the office. OK so it all works fine under Win32. When I upload it and try to run it under Free BSD 4.04 it breaks. As I said the script is writing HTML from the pod of a number of scripts. It breaks because pod2html is not writing any HTML for the script itself (which has pod). OK I think, there is some OS related problem with pod2html(ing) a running script. Not so.
After several frustrating hours I have isolated the follwing bug:
bash-2.05$ cat test1.pl =head2 PASS You can pod2html this =cut bash-2.05$ perl -MPod::Html -e 'pod2html("--infile=./test1.pl")' -e: no title for ./test1.pl at /usr/libdata/perl/5.00503/Pod/Html.pm l +ine 330. <HTML> <HEAD> <TITLE>./test1.pl</TITLE> <LINK REV="made" HREF="mailto:hackers@FreeBSD.org"> </HEAD> <BODY> [snip] </BODY> </HTML> bash-2.05$
bash-2.05$ cat test2.pl use Pod::Html; =head2 FAIL You can't pod2html this =cut bash-2.05$ perl -MPod::Html -e 'pod2html("--infile=./test2.pl")' bash-2.05$
bash-2.05$ cat test3.pl # pod2html - not even in comments? =head2 FAIL You can't pod2html this =cut bash-2.05$ perl -MPod::Html -e 'pod2html("--infile=./test3.pl")' bash-2.05$
As you can see with the test cases Pod::Html breaks and fails to write HTML from valid pod if the strings Pod::Html or pod2html appear seemingly anywhere in the source code. Raw call, in a quoted string or print, even in comments!
Why is it so? I have RTFS and have NFI. It is system dependent as it occurs running under Free BSD but not Win32. Although not shown above I locally installed exactly the same version of Pod::Html used on Win32 on the Free BSD system and the problem still remains.
cheers
tachyon
s&&rsenoyhcatreve&&&s&n.+t&"$'$`$\"$\&"&ee&&y&srve&&d&&print
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Can someone explain this weird Pod::Html bug?
by stefan k (Curate) on Nov 30, 2001 at 15:14 UTC | |
by tachyon (Chancellor) on Nov 30, 2001 at 15:25 UTC | |
|
Re: Can someone explain this weird Pod::Html bug?
by japhy (Canon) on Nov 30, 2001 at 15:10 UTC |