rjbs/dist-zilla — pull request #168 by hartzell (2013-04-17 16:12:02+00:00)
Title: Make Plugin::PkgVersion and perlcritic's RequireUseStrict get along.

This change makes PkgVersion and RequireUseStrict get along.

It is based on Ricardo's suggestion of walking forward across any use statements (PPI::Statement::Include) but goes a bit further to carefully walk out to the end of the line, thereby avoiding separating comments from their commentees.

It has to dance around a bit to handle differences in PPI's insert_after methods, depending on the class of PPI element the insertion point lands on.

All of the original tests pass. I've added a separate set of tests that take a bigger picture look at the output, so that I could convince myself that everything works. They use Test::String so that I didn't have to do the monkey work of figuring out where the expected and empirical results differed. If you give me some feedback I'm willing to try to merge them into the main PkgVersion tests.