If you look at the source code of HTML::Element, you will find that it prefers to sort the attribute keys alphabetically. My approach would be to derive a class from HTML::Element which overrides the to_string method (or whatever) to output the attributes in a more explicit manner. I think something like this was already suggested to you.
Your approach of hoping that the text will never contain 0name or 1content is also plausible, personally, I would rather look at using one of the template solutions to create text that absolutely must follow a specific format.
In reply to Re^4: Ordering meta tag attributes with HTML::Element
by Corion
in thread Ordering meta tags with HTML::Element
by HeadScratcher
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |