Show quoted text>
> OK, (based on testing only one other example, p()) it appears that
> CGI.pm automatically makes an empty tag out of any HTML generating
> function which has no content; e.g.
>
> print p();
Correct.
Show quoted text> BTW, I read your blog post but nevertheless find the HTML generating
> functions to be an extremely useful way to avoid making or at least
> quickly finding typographical errors. The functional approach, although
> not always convenient, frequently simplifies things when I have to spit
> out a largish collection of nested tags, say a table inside a table
> inside a div inside another div with p's sprinkled about for good
> measure, and it helps me sort out the logic in a consist way; e.g.
While I don't use or endorse this aspect of CGI.pm, I do appreciate
that there is more than one way to do it.
Your help continuing to look into this would be welcome. The code is on
github now:
http://github.com/markstos/CGI.pm
This might also be useful as a reference:
http://github.com/markstos/html--parser--simple/blob/master/lib/HTML/Parser/Simple.pm
Near the top there is a data structure listin all the self-closing tags
in XHTML.
For a change like this, we would also want automated tests included in
a patch.
Mark