Sneaking Perl in to a J2EE project

dws on 2003-08-26T23:38:33

For the n+1st time in my career, I've snuck Perl into a non-Perl project by writing a script that scans the code base looking for certain patterns. This time around I'm looking for "@todo" and "FIX" markers in the code (we haven't standardized on a way of recording "this needs attention"), and for property names in code that don't have corresponding entries in the properties files (something otherwise detectable only at runtime).

Eventually, this will grow to give us incremental counts of files and lines, so that we can chart "growth" in the codebase (for our own curiousity). I'll probably have to add a "does each file contain the correct copyright/disclaimer" at some point.

In projects past, people have found the results of these scripts so handy that any objection to Perl is quickly overcome.


not to skimp on perl

lachoy on 2003-08-27T02:40:57

...but the amazing IntelliJ IDEA IDE does this stuff (finding todos) for you -- customizable with regexen even. If you haven't used it before I strongly recommend it -- this is coming from a person who never thought he'd get away from xemacs for doing any sort of programming. If work didn't buy me a copy and I did Java programming in my spare time I might even buy a copy for myself -- it's that good.

Perl on board

perrin on 2003-08-27T17:13:45

I have also sneaked Perl into many Java projects. Monitoring, reformatting SQL build scripts, and automating various things that my Java-steeped co-workers thought couldn't be automated are pretty routine tasks for Perl in a Java shop.