line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
785
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
40
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
66
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Code::Statistics::Target::Sub; |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$Code::Statistics::Target::Sub::VERSION = '1.112980'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: represents a sub in perl code |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
5
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
7
|
|
12
|
|
|
|
|
|
|
extends 'Code::Statistics::Target'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub find_targets { |
16
|
8
|
|
|
8
|
1
|
18
|
my ( $class, $file ) = @_; |
17
|
8
|
|
|
|
|
251
|
return $file->ppi->find( 'PPI::Statement::Sub' ); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
__END__ |
23
|
|
|
|
|
|
|
=pod |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Code::Statistics::Target::Sub - represents a sub in perl code |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 VERSION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
version 1.112980 |
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
|
|
|
|
|
|
|
This software is Copyright (c) 2010 by Christian Walde. |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
This is free software, licensed under: |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004 |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=cut |
49
|
|
|
|
|
|
|
|