I'd say that being able to write simpler code is a win. So:
- Don't die nor warn (by default) on "deleting" a non-existant tag (even if there is some reason that it should be "impossible" for the tag to exist, such as the token being an end tag)
- Have the "delete" method return what was deleted (just like delete does)
- Have "add attribute" complain for end tags
So I could certainly see value in having an optional complaint emitted if you try to delete attributes from end tags (for those who want to detect if they are being "sloppy" in this respect as a check on the validity of their code). But I don't think that should be the default (in a module with "Simple" in the name).
- tye
-
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.
|