Today at work the toy problem of extracting some data from $more_json in a line like "$json|$more_json". The obvious thing seemed to use Text::Balanced to skip the first $json, snip off the '|' and then use a real JSON parser on the next json blob.
So uh... there's no Text::Balanced in Ruby. Not that I can find. We solved our work problem by just declaring that we'd only use delimiters which didn't occur in our input so we wouldn't need to find a Ruby Text::Balanced. I'm thinking maybe the easiest thing to do if we do turn out to need this in Ruby will be to write a gem that embeds a Perl interpreter. Then Ruby's Text::Balanced is just a short adapter over the Perl version.
It's just a thought though.
Or... (Score:1)
rubycritic...or rubytidy
And while I'm at it, where's perls Rake? imho, it kicks Makefile.PL in the ass sometimes.
Re: (Score:1)
What's Rake? Details man, details. What are we missing exactly?
Re: (Score:1)
It's make, except in Ruby. Module::Build isn't perl's Rake because M::B is focused on modules. Rake encompasses comparable gem tasks as M::B but is also a generally useful tool, just like make, except not evil.
Re:Or… (Score:1)
Think “DSL around Algorithm::Dependency for typical file-munging tasks” – roughly. Using the Rake Build Language [martinfowler.com] has a bunch of examples where you can see how it looks.
TinyMake [cpan.org] could be a rendition in Perl, but I find it a bit too underengineered to be truly useful…
I had some notes somewhere and have made a few starts at building a Rake clone, but I haven’t felt I got quite far enough with the concepts to start building something.
nitpick (Score:1)
Ruby has nitpick at http://github.com/kevinclark/nitpick/tree/master [github.com]. FWIW, tt's oppressively slow and has the following checks: