1Perl::Critic::Utils::McUCsaebre(C3o)ntributed Perl DocumPeenrtla:t:iCornitic::Utils::McCabe(3)
2
3
4

NAME

6       Perl::Critic::Utils::McCabe - Functions that calculate the McCabe score
7       of source code.
8

DESCRIPTION

10       Provides approximations of McCabe scores.  The McCabe score of a set of
11       code describes the number of possible paths through it.  The functions
12       here approximate the McCabe score by summing the number of conditional
13       statements and operators within a set of code.  See
14       <http://www.sei.cmu.edu/str/descriptions/cyclomatic_body.html> for some
15       discussion about the McCabe number and other complexity metrics.
16

INTERFACE SUPPORT

18       This is considered to be a public module.  Any changes to its interface
19       will go through a deprecation cycle.
20

IMPORTABLE SUBS

22       "calculate_mccabe_of_sub( $sub )"
23           Calculates an approximation of the McCabe number of the code in a
24           PPI::Statement::Sub.
25
26       "calculate_mccabe_of_main( $doc )"
27           Calculates an approximation of the McCabe number of all the code in
28           a PPI::Statement::Document that is not contained in a subroutine.
29

AUTHOR

31       Jeffrey Ryan Thalhammer <thaljef@cpan.org>
32
34       Copyright (c) 2005-2009 Jeffrey Ryan Thalhammer.  All rights reserved.
35
36       This program is free software; you can redistribute it and/or modify it
37       under the same terms as Perl itself.  The full text of this license can
38       be found in the LICENSE file included with this module.
39
40
41
42perl v5.12.1                      2010-09-08    Perl::Critic::Utils::McCabe(3)
Impressum