Ideas from TPRC2022: Tools to help refactor large mature code bases
Every Perl gig I have ever had, and from most of the conversations I had at this years Perl and Raku Conference, was working on a large code based that is serving the business and it's customers very well such that the business is profitable (i.e. a mature code base).
This is an enviable position to be in but whilst this software is robust from the outside, there is often a reluctance to make dramatic changes. Unfortunately code that is perceived as too fragile to touch tends to be replaced and replaced in another language.
The PPI + Class::Inspector combination is already being used by people I've spoken too, in bespoke tools to refactor large code bases reliably.
We have frameworks for testing (Test:: etc) and linting (Perl::Critic) with suites of well established reusable polices, so why not a similar framework for refactoring?
Such a tool might have provided polices to assist replacing deprecated syntax, migrate between "Try" implementations, fixing up scalar vs list context, just to name a few.



