Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number

Re: Cyclomatic Complexity of Perl code

by pernod (Chaplain)
on Dec 08, 2004 at 09:39 UTC ( #413138=note: print w/replies, xml ) Need Help??

in reply to Cyclomatic Complexity of Perl code

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


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!

Mischief. Mayhem. Soap.

Replies are listed 'Best First'.
Re^2: Cyclomatic Complexity of Perl code
by Anonymous Monk on Dec 08, 2004 at 18:28 UTC
    Which would be a good idea to bring up what I heard someone term "Gilb's Law"

    (paraphrasing) "For anything that you wish to measure there exists some way of doing so that is better than not measuring at all"

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://413138]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others pondering the Monastery: (2)
As of 2019-08-25 06:33 GMT
Find Nodes?
    Voting Booth?

    No recent polls found