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