Re: TPF Devel::Cover grant report Week 18

Ovid <[email protected]>
Newsgroups gmane.comp.lang.perl.quality-assurance
Message-ID <[email protected]>
From: Jeffrey Thalhammer <[email protected]>
>To: Ovid <[email protected]> 
>Cc: Paul Johnson <[email protected]>; "[email protected]" <[email protected]> 
>Sent: Monday, 1 October 2012, 22:48
>Subject: Re: TPF Devel::Cover grant report Week 18
> 
>
>On Oct 1, 2012, at 2:00 AM, Ovid wrote:
>
>> For others: yes, I know that PPI offers cyclomatic complexity information. I would like to see all code coverage information provided in "one-stop shopping" for Perl rather than relying on a separate tool (and I don't know that PPI exposes the control-flow graph used to calculate the cyclomatic complexity. Does it?).
>
>To my knowledge, PPI doesn't compute cyclomatic complexity.  But Perl::Critic approximates it just by counting conditional operators and keywords.
>
>-Jeff


D'oh! You're right.

I didn't realize that P:C only approximates it.

For those who haven't seen it, it's the "McCabe score" when you use --statistics:

    $ perlcritic lib/ --statistics
    <snip>
      5 files.
     21 subroutines/methods.
    177 statements.

    450 lines, consisting of:
         59 blank lines.
         10 comment lines.
          4 data lines.
        207 lines of Perl code.
        170 lines of POD.

    Average McCabe score of subroutines was 1.52.
Cheers,
Ovid
--
Twitter - http://twitter.com/OvidPerl/
Buy my book - http://bit.ly/beginning_perl
Buy my other book - http://www.oreilly.com/catalog/perlhks/
Live and work overseas - http://www.overseas-exile.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.