line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Perl::Metrics::Simple::Output; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
our $VERSION = 'v1.0.2'; |
4
|
|
|
|
|
|
|
|
5
|
4
|
|
|
4
|
|
2183
|
use strict; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
135
|
|
6
|
4
|
|
|
4
|
|
22
|
use warnings; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
109
|
|
7
|
|
|
|
|
|
|
|
8
|
4
|
|
|
4
|
|
21
|
use Carp qw(); |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
1166
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
sub new { |
11
|
4
|
|
|
4
|
0
|
2533
|
my ( $class, $analysis ) = @_; |
12
|
|
|
|
|
|
|
|
13
|
4
|
50
|
33
|
|
|
20
|
if ((! ref $analysis) && ($analysis->isa('Perl::Metrics::Simple::Analysis')) ) { |
14
|
0
|
|
|
|
|
0
|
Carp::confess('Did not pass a Perl::Metrics::Simple::Analysis object.'); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
4
|
|
|
|
|
12
|
my $self = bless { |
18
|
|
|
|
|
|
|
_analysis => $analysis, |
19
|
|
|
|
|
|
|
}, $class; |
20
|
|
|
|
|
|
|
|
21
|
4
|
|
|
|
|
17
|
return $self; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
sub analysis { |
25
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
26
|
0
|
|
|
|
|
|
return $self->{'_analysis'}; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub make_report { |
30
|
0
|
|
|
0
|
0
|
|
Carp::confess('Use one of the sub-classes, e.g. Perl::Metrics::Simple::Output::PlainText'); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub make_list_of_subs { |
34
|
0
|
|
|
0
|
0
|
|
my ($self) = @_; |
35
|
|
|
|
|
|
|
|
36
|
0
|
|
|
|
|
|
my $analysis = $self->analysis(); |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
my @main_from_each_file |
39
|
0
|
|
|
|
|
|
= map { $_->{main_stats} } @{ $analysis->file_stats() }; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
my @sorted_all_subs = sort { $b->{'mccabe_complexity'} <=> $a->{'mccabe_complexity'} } ( @{ $analysis->subs() }, @main_from_each_file ); |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
return [ \@main_from_each_file, \@sorted_all_subs ]; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
1; # Keep Perl happy, snuggy, and warm. |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
__END__ |