1Perl::Metrics::Simple::UAsnearlyCsoinst(r3i)buted Perl DPoecrulm:e:nMteattriiocns::Simple::Analysis(3)
2
3
4

NAME

6       Perl::Metrics::Simple::Analysis - Contains anaylsis results.
7

SYNOPSIS

9       This is the class of objects returned by the analyze_files method of
10       the Perl::Metrics::Simple class.
11
12       Normally you would not create objects of this class directly, instead
13       you get them by calling the analyze_files method on a
14       Perl::Metrics::Simple object.
15

VERSION

17       This is VERSION 0.1
18

DESCRIPTION

USAGE

21   new
22         $analysis = Perl::Metrics::Simple::Analsys->new( \@file_objects )
23
24       Takes an arrayref of Perl::Metrics::Simple::Analysis::File objects and
25       returns a new Perl::Metrics::Simple::Analysis object.
26
27   data
28       The raw data for the analysis. This is the arrayref you passed as the
29       argument to new();
30
31   files
32       Arrayref of file paths, in the order they were encountered.
33
34   file_count
35       How many Perl files were found.
36
37   lines
38       Total lines in all files, excluding comments and pod.
39
40   main_stats
41       Returns a hashref of data based the main code in all files, that is, on
42       the code minus all named subroutines.
43
44         {
45           lines             => 723,
46           mccabe_complexity => 45
47         }
48
49   file_stats
50       Returns an arrayref of hashrefs, each entry is for one analyzed file,
51       in the order they were encountered. The main_stats slot in the hashref
52       is for all the code in the file outside of any named subroutines.
53
54          [
55             {
56               path => '/path/to/file',
57               main_stats => {
58                               lines             => 23,
59                               mccabe_complexity => 3,
60                               path              => '/path/to/file',
61                               name              => '{code not in named subroutines}',
62                              },
63               },
64               ...
65          ]
66
67   packages
68       Arrayref of unique packages found in code.
69
70   package_count
71       How many unique packages found.
72
73   subs
74       Array ref containing hashrefs of all named subroutines, in the order
75       encounted.
76
77       Each hashref has the structure:
78
79           {
80                'lines' => 19,
81                'mccabe_complexity' => 6,
82                'name' => 'databaseRecords',
83                'path' => '../path/to/File.pm',
84           }
85
86   sub_count
87       How many subroutines found.
88
89   summary_stats
90       Returns a data structure of the summary counts for all the files
91       examined:
92
93           {
94               sub_length      => {
95                   min           => $min_sub_length,
96                   max           => $max_sub_length,
97                   sorted_values => \@lengths_of_all_subs,
98                   mean          => $average_sub_length,
99                   median        => $median_sub_length,
100                   standard_deviation => $std_dev_for_sub_lengths,
101                },
102               sub_complexity  => {
103                   min           => $min_sub_complexity,
104                   max           => $max_sub_complexity,
105                   sorted_values => \@complexities_of_all_subs,
106                   mean          => $average_sub_complexity,
107                   median        => $median_sub_complexity,
108                   standard_deviation => $std_dev_for_sub_complexity,
109               },
110               main_complexity => {
111                   min           => $min_main_complexity,
112                   max           => $max_main_complexity,
113                   sorted_values => \@complexities_of_all_subs,
114                   mean          => $average_main_complexity,
115                   median        => $median_main_complexity,
116                   standard_deviation => $std_dev_for_main_complexity,
117               },
118           }
119

STATIC PACKAGE SUBROUTINES

121       Utility subs used internally, but no harm in exposing them for now.
122       Call these with a fully-qualified package name, e.g.
123
124         Perl::Metrics::Simple::Analysis::is_ref($thing,'ARRAY')
125
126   is_ref
127       Takes a thing and a type. Returns true is thing is a reference of type
128       type, otherwise returns false.
129

BUGS AND LIMITATIONS

131       None reported yet ;-)
132

DEPENDENCIES

134       Readonly
135       Statistics::Basic
136

SUPPORT

138       Via CPAN:
139
140   Disussion Forum
141       http://www.cpanforum.com/dist/Perl-Metrics-Simple
142
143   Bug Reports
144       http://rt.cpan.org/NoAuth/Bugs.html?Dist=Perl-Metrics-Simple
145

AUTHOR

147           Matisse Enzer
148           CPAN ID: MATISSE
149           Eigenstate Consulting, LLC
150           matisse@eigenstate.net
151           http://www.eigenstate.net/
152
154       Copyright (c) 2006-2009 by Eigenstate Consulting, LLC.
155
156       This program is free software; you can redistribute it and/or modify it
157       under the same terms as Perl itself.
158
159       The full text of the license can be found in the LICENSE file included
160       with this module.
161

SEE ALSO

163       perl(1).
164
165
166
167perl v5.28.1                      2015-01-04Perl::Metrics::Simple::Analysis(3)
Impressum