If this a module that was doing more general processing of directory / file paths, I'd use File::Spec. But the directories in @INC have to work for Perl (by definition), so I think the approach presented above is probably good enough for this module's purpose.
]]>The old kids are still there because they are tried-and-true and that is never to be mocked, but then again, most people (at least on this board) already know about them.
It is really interesting to see that Mojo::DOM stacks up against the XS based modules. You are right about the target of HTML5, but I wonder if we should file a bug on mojolicious; it seems like the old allowed comment syntax could be added without too much difficulty.
Edit:
Actually it seems that HTML::TreeBuilder has a problem with that example too; notice that the </p>
tag is missing! Also, I have filed a bug on the HTML4 style comments and submitted a pull request with tests.
Cheers!
]]>foo = (1 IF 0); # foo set to nothing
instead of
(foo = 1) IF 0; # foo not touched since !0]]>
Which is quite unfortunate, given the fact that it's mainly used in Perl based shops.
]]>