|Looking at your coded $data, that doesn't seem much different in concept from the html generation available from CGI.pm.
Hmm. There is indeed some similarity. But there are two important differences:
You correctly recognised that as code, but I think you missed by designing it back into the perl layer.
- CGI.pm only does HTML-tags. My proposed system would handle anything you could write a template for.
- The HTML-generating functions of CGI.pm return the finished HTML-string. My proposed system would return an object that would stringify only whern requested to do so (e.g. by calling $th->fill)
See my reply to Ovid
s post above.
I am still not sure if i missed with my idea or just didn't describe it properly...
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>
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
Want more info? How to link or
or How to display code and escape characters
are good places to start.