On Dec 16, 2006, at 12:07 PM, Matisse Enzer wrote:

On Dec 15, 2006, at 10:13 PM, Chris Dolan wrote:

OK, I see. Perhaps I was distracted from your main point by mention of cyclomatic complexity, which has a rather specific definition.

Mea culpa.
In the next release I will change the documentation for Perl::Metrics::Simple to make clear how exactly the complexity score is calculated, and that it is only an approximation of true cyclomatic complexity.

Meanwhile, I am open to making the measurement more useful. For example, should
    if ($a eq $b)
or
    if ( $a == $b )

be counted as more complex than:
    if ( $a )

*shrug* It's really up to you and your user base, as long as you are consistent. Certainly the former examples require more tests to get full coverage.

Personally, I use Devel::Cover's concept of complexity implicitly.

Chris

--
Chris Dolan, Software Developer, http://www.chrisdolan.net/
Public key: http://www.chrisdolan.net/public.key
vCard: http://www.chrisdolan.net/ChrisDolan.vcf



Reply via email to