Long ago, I used regex's to parse HTML.
They told me it was evil. They told me it was not maintainable. They were right.
HTML::Parser, HTML::TreeBuilder, I'm sure you're brilliant in your own way. I'm sure you have conquered many lands, and for those who wanted to adapt to your mindset, you brought much happiness.
I wanted a simpler way. jQuery taught us that css selectors are that better way.
Fortunately, Mojo::DOM sprouted up out of the land of Mojolicious and cookies and rainbows and unicorns.
Seriously, have you ever seen HTML retrieved, parsed, and processed so nicely in Perl?
You're not relegated to parsing only web-requested data; you can use Mojo::DOM directly:
Installing is one-step easy:
curl -L get.mojolicio.us | sh
So now you know: you can leave the cruftiness behind, and hang with the hippest of the hip - there's no need to hide your head in shame when talking with hipsters about the latest Ruby shine. Shine is external; your Mojo runs deep.comments powered by Disqus