I can see $bgcolor and know exactly what it means. Same with any other well-named variable. That aside there are tons of problems with your approach
- What happens when you need to make a really large page? You can't see $bgcolor if its buried under 1000 lines of lines of HTML. You also will find it much harder to see anything else in your program.
- Designers don't know and don't want to learn Perl. They want to make HTML in Dreamweaver and then have you make it work. Templating makes this much easier and I can write the program while they're making pretty pictures.
- Much less typing! No need for the extra print statements! Design with an HTML editor if you want to. Or as I stated above another designer can work on it.
- This code isn't modular, you can't reuse the HTML design easily without copying it to another script. Templates make reuse simple
No offense intended and I understand its your opinion, however your suggestion is the exact opposite of what the parent poster is trying to accomplish. So its not exactly helpful. Also try some templating, trust me, its not hard (I personally like H::T!) and once you get it you'll never ever go back!
Update: Fixed some typos and my terrible spelling :)
-
Are you posting in the right place? Check out Where do I post X? to know for sure.
-
Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
<code> <a> <b> <big>
<blockquote> <br /> <dd>
<dl> <dt> <em> <font>
<h1> <h2> <h3> <h4>
<h5> <h6> <hr /> <i>
<li> <nbsp> <ol> <p>
<small> <strike> <strong>
<sub> <sup> <table>
<td> <th> <tr> <tt>
<u> <ul>
-
Snippets of code should be wrapped in
<code> tags not
<pre> tags. In fact, <pre>
tags should generally be avoided. If they must
be used, extreme care should be
taken to ensure that their contents do not
have long lines (<70 chars), in order to prevent
horizontal scrolling (and possible janitor
intervention).
-
Want more info? How to link
or How to display code and escape characters
are good places to start.
|