Seeing as how only start tags can have attributes
i think that the latter is more representative of the
'real world'. However, since this is a "Simple" module, then
perhaps it would possible to check if $self
is a start tag inside
and gracefully return if it is not? It could be a simple matter
of performing that if
statement for the client,
which is nice as long as the client doesn't need to "grab
a hook", which i don't think they will.
In conclusion ... i say take care of it for the client,
simply because the name is HTML::TokePaser::Simple.
(the triplet paradiddle with high-hat)