http://www.perlmonks.org?node_id=413138


in reply to Cyclomatic Complexity of Perl code

I would like to be able to calculate the Cyclomatic Complexity of some Perl code.

Why?

Don't get me wrong. Software metrics, properly used and configured, are great tools. The question is; is cyclomatic complexity what you really need?

BrowserUk has given lots of reasons for not using this metric on dynamic languages, and I agree wholeheartedly with him. I would suggest looking for other metrics first before this one, starting with test coverage (as mentioned already in this thread). A super search on Devel::Cover will give you lots of useful information.

A look at Tom Gilb's work on evolutionary programming and measurable requirements might also be a good idea. Gilb is a loudmouth, but many of his ideas are sound.

I know this does not answer your question, but I hope it will give some food for thought. Good luck measuring!

pernod
--
Mischief. Mayhem. Soap.