First, I do plan to introduce CGI::Carp.
I recommend that the people take the course learn to use the CGI.pm HTML functions for several reasons:
- If they work on anyone else's CGI scripts, they are likely to encounter them sooner or later, so they should know them.
- Because CGI.pm is creating your HTML for you, it provides a rough syntax check of the HTML. You can't get that with a here doc or with HTML::Template.
- You can't forget to close your tags (why, just today I fixed a table that someone forgot the closing table tag. Too bad for Netscape).
- It's tough for them to decide if they like these functions if they never use them.
I plan to introduce a variety of methods of creating the HTML, so that people taking the course can see the pros and cons of different methods (TIMTOWTDI). It's tough to evaluate something you have never used. I hate multiple
print statements and a here document is not much better. Obviously, for large sites, mixing code and HTML is a nightmare. At the very least, the HTML functions are code as opposed to markup tags. I won't demand that the people taking the course use any one method, but I will ask that they at least be familiar with them.
Cheers,
Ovid
Join the Perlmonks Setiathome Group or just go the the link and check out our stats.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.