December 2017 Archives

An alternative to HTML::Tagset

HTML::Tagset is a popular module on CPAN and has nearly nine thousand descendants in the "River of CPAN". Unfortunately its last version was in March 2008, nearly ten years ago, so it doesn't feature the HTML5 tags yet. There has been some discussion on the HTML tag set bug tracker but so far that has not come to fruition. As an alternative to HTML::Tagset, I made the module HTML::Valid::Tagset, which incorporates the data tables of the "Tidy HTML5" project.

It's partly based on HTML::Tagset's interface, so it can substitute for some of that module's functionality, and it also has specific tag sets for each version of HTML, including HTML5.

Having the Tidy HTML5 data tables means I was also able to add a function attributes which returns a list of valid attributes for a tag, and tag_attr_ok, which returns true or false depending on whether a particular tag can take a particular attribute. This is part of a larger distribution called HTML::Valid, based on the Tidy HTML5 project.

Why I recommend using the "++" system of Metacpan

A few days ago I bought some Christmas tree lights from amazon.co.jp, the Japanese version of Amazon:

https://www.amazon.co.jp/gp/product/B076WTG77B/ref=oh_aui_detailpage_o00_s00?ie=UTF8&psc=1

One of the words in the description of the item is パーティスマスツリー, which seems to be "party-mas-tree". You might think that is some kind of Japanese neologism, but there's no such word as "パーティスマスツリー" in Japanese. A google search just brings you back to Amazon.co.jp.

https://encrypted.google.com/search?hl=en&q=%22%E3%83%91%E3%83%BC%E3%83%86%E3%…

About Ben Bullock

user-pic Perl user since about 2006, I have also released some CPAN modules.