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://en.wikipedia.org/wiki/Cyclomatic_complexity> 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 <jeff@imaginative-software.com>
32
34       Copyright (c) 2005-2011 Imaginative Software Systems.  All rights
35       reserved.
36
37       This program is free software; you can redistribute it and/or modify it
38       under the same terms as Perl itself.  The full text of this license can
39       be found in the LICENSE file included with this module.
40
41
42
43perl v5.34.0                      2021-07-22    Perl::Critic::Utils::McCabe(3)
Impressum