in reply to Ordering meta tags with HTML::Element
If you aren't opposed to dirty little hacks, you could modify the attribute names you make to take advantage of the "sort keys" used in the starttag sub to order the attributes.
e.g. instead of
you write$m_el->attr('name',$m); $m_el->attr('content',$meta{$m});
Then you just post process $out to substitue in the real attribute names. e.g. $out =~ s/aa01_name/name/g$m_el->attr('aa01_name',$m); $m_el->attr('aa02_content',$meta{$m});
I only feel a little dirty ;)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Ordering meta tags with HTML::Element
by Corion (Patriarch) on Jun 15, 2016 at 11:18 UTC |