Aaah! But you ARE missing out on something! Using the CGI tag shortcuts you don't have to write out the tags and the string is enclosed in Perl's parentheses rather than difficult to mind-parse tags (stay in Perl if you're using Perl ideology). Also, You'll be able to organize the HTML more clearly- including indentation (automatic for Perl and NOT for HTML in good editors), better spacing, and attribute clarity. Especially if you have long lines of attributes, you'll save yourself days of mind-boggling debugging if you use:
print HTMLtag({-attr1=>'bob',
-attr2=>'Sammy Snake',
....},
'Sammy Snake's Page');
rather than raw HTML. Table generation is also
extremely useful in the
CGI module, allowing you to logically group your attributes and indent them rather than arbitrary HTML spacing. If you read through the
CGI docs, you'll also learn about a cool "design your own tag" which is easily created in the use CGI; line. That way, you can name an arbitrary new tag (which
CGI may not support by default) with arbitrary attributes. In short, using
CGI to its fullest can only result in beneficial and "easier-on-them-eyes" programming techniques. It definitely worth reading up on. M$ is mentioned in the tutorial. Btw, the syntaxes are to-the-point and rather obvious.
print TagWithNoAttrs('Howdy Ho Neighbor!');
print TagWithAttrs({-attr1=>'Blue',-attr2=>'orange'},'How many Preside
+nts does it take to screw an intern?');
CGI also supports a method whereby you simply pass string arguments and thus implicitly print the attributes in a logical order without declaring what they are, but I tend towards the more explicit method. Have fun with
CGI, though. That's what its main purpose is. (OK, so maybe that's arguable.)
AgentM Systems nor Nasca Enterprises nor
Bone::Easy nor Macperl is responsible for the
comments made by
AgentM. Remember, you can build any logical system with NOR.