I use the following command to test my perl code:
perl -MB :: Lint :: StrictOO -MO = Lint, all, oo -M-circle :: require -M-indirect -Mwarnings :: method -Mwarnings :: unused -c $ file
On a system with perl version less than 5.10, I also use uninit.
I also use Perl :: Critic and Perl :: Tidy and have customized the corresponding rc files to my liking.
These modules did a great job helping me overcome some bad habits that I learned when I first studied perl.
Are there any other modules or pragmas that hit me straight and narrow when I messed up?
The use of tests and the Test :: * family of modules and some good books have been noted. This new information made me rethink some assumptions about the relationship between testing and code building. All of them are being evaluated and are already being researched and used.
It seems to me that these are two separate parts of the whole. 'perl -c', Perl :: Critic and Perl :: Remove all help while writing code and before executing code. Devel :: Cover, Devel :: NYTProf and tests occur during and after code execution.
An iterative process dictates good development, so the tests will be executed, and the code will be developed again and again, but we still have this separation.
It seems to me that the main focus in the answers was "during and after execution" of the code. Again, this is very much appreciated. Can I assume that I have the โwriting and pre-executionโ part? At least, as well as pragmas, modules and utilities.
perl code analysis
harleypig
source share