1COUNTPERL(1)          User Contributed Perl Documentation         COUNTPERL(1)
2
3
4

NAME

6       countperl - count lines, packages, subs and complexity of Perl files.
7

USAGE

9       countperl FILE_OR_DIRECTORY [FILE_OR_DIRECTORY ...] [--html] [--help]
10       [--method-modifiers=a,b,c]
11

REQUIRED ARGUMENTS

13       At least one file or directory path must be supplied.
14

OPTIONS

16       --help
17           Prints documentation to STDERR.
18
19       --html
20           Produces HTML output instead of the plain-text default.
21
22       --method-modifiers=a,b,c
23           A comma-separated list of method modifiers to be recognised, see
24           Moose::Manual::MethodModifiers for details. If unspecified, the
25           default list is before,after,around.
26

CONFIGURATION

28       N/A. Currently no support for any configuration files.
29

EXIT STATUS

31       Exits zero on success, non-zero on failure.
32

DESCRIPTION

34       countperl uses Perl::Metrics::Simple to examines the named files and
35       recursivesly searches named directories for Perl files.
36
37       Perl files are identified by Perl::Metrics::Simple->is_perl_file.
38       Basically if the file ends in ".pl", ".pm", or ".t" or has what appears
39       to be a perl shebang line.
40
41       countperl produces a report on STDOUT of counts of total lines,
42       packages, subroutines/methods, the minimum, maximum, mean, standard
43       deviation, and median size and mccabe_complexity (cyclomatic
44       complexity) of subroutines and the 'main' portion of each file
45       (everything not in a subroutine.)
46
47   Output Format
48       Line counts do not include comments nor pod.
49
50       The current output format is human-readable text:
51
52           Perl files found:                3
53
54           Counts
55           ------
56           total code lines:       856
57           lines of non-sub code:  450
58           packages found:           3
59           subs/methods:            42
60
61           Subroutine/Method Size
62           ----------------------
63           min:                  3 lines
64           max:                  32 lines
65           mean:                 9.67 lines
66           std. deviation:       7.03
67           median:               7.50
68
69           McCabe Complexity
70           -----------------
71           Code not in any subroutine::
72           min:                  1
73           max                   1
74           mean:                 1.00
75           std. deviation:       0.00
76           median:               1.00
77
78           Subroutines/Methods:
79           min:                  1
80           max:                  5
81           avg:                  1.00
82           std. deviation:       1.36
83           median:               1.00
84
85           Tab-delimited list of subroutines, with most complex at top
86           -----------------------------------------------------------
87           complexity      sub     path    size
88           5       is_perl_file    lib/Perl/Metrics/Simple.pm      11
89           5       _has_perl_shebang       lib/Perl/Metrics/Simple.pm      13
90           5       _init   lib/Perl/Metrics/Simple/Analysis/File.pm        30
91           4       find_files      lib/Perl/Metrics/Simple.pm      11
92           4       new     lib/Perl/Metrics/Simple/Analysis.pm     10
93           4       is_ref  lib/Perl/Metrics/Simple/Analysis.pm     8
94
95       With --html switch output format is HTML.
96

VERSION

98       This is version 0.031 of countperl.
99

DIAGNOSTICS

101       Prints usage message to STDERR if required arguments are not provided.
102

INCOMPATIBILITIES

104       None known.
105

BUGS AND LIMITATIONS

107   Bugs No bugs reported yet :-) See:
108       http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Metrics-Simple
109   Limitations
110       Does not accept input from STDIN.
111       No machine-readable report format available (e.g. XML, tab-delimited)
112

SUPPORT

114       Via CPAN:
115
116   Disussion Forum
117       http://www.cpanforum.com/dist/Perl-Metrics-Simple
118
119   Bug Reports
120       http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Metrics-Simple
121

DEPENDENCIES

123       Perl::Metrics::Simple 0.13 (which depends upon PPI.)
124       Pod::Usage
125

SEE ALSO

127       PPI
128       Perl::Critic
129       Perl::Metrics
130       http://en.wikipedia.org/wiki/Cyclomatic_complexity
131

AUTHOR

133           Matisse Enzer
134           CPAN ID: MATISSE
135           Eigenstate Consulting, LLC
136           matisse@eigenstate.net
137           http://www.eigenstate.net/
138
140       This program is free software; you can redistribute it and/or modify it
141       under the same terms as Perl itself.
142
143       The full text of the license can be found in the LICENSE file included
144       with this module.
145
146
147
148perl v5.28.0                      2018-07-15                      COUNTPERL(1)
Impressum