line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
489
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
27
|
|
2
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
43
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Code::Statistics::Target::Block; |
5
|
|
|
|
|
|
|
$Code::Statistics::Target::Block::VERSION = '1.190680'; |
6
|
|
|
|
|
|
|
# ABSTRACT: represents a block in perl code |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
5
|
use Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
4
|
|
9
|
|
|
|
|
|
|
extends 'Code::Statistics::Target'; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub find_targets { |
13
|
8
|
|
|
8
|
1
|
18
|
my ( $class, $file ) = @_; |
14
|
8
|
|
|
|
|
164
|
return $file->ppi->find( 'PPI::Structure::Block' ); |
15
|
|
|
|
|
|
|
} |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
1; |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
__END__ |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
=pod |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=encoding UTF-8 |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Code::Statistics::Target::Block - represents a block in perl code |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 VERSION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
version 1.190680 |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head2 find_targets |
34
|
|
|
|
|
|
|
Returns all PPI::Structure::Block elements found in the given file. |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 AUTHOR |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Christian Walde <mithaldu@yahoo.de> |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Christian Walde has dedicated the work to the Commons by waiving all of his |
44
|
|
|
|
|
|
|
or her rights to the work worldwide under copyright law and all related or |
45
|
|
|
|
|
|
|
neighboring legal rights he or she had in the work, to the extent allowable by |
46
|
|
|
|
|
|
|
law. |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Works under CC0 do not require attribution. When citing the work, you should |
49
|
|
|
|
|
|
|
not imply endorsement by the author. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=cut |