line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
1
|
|
|
1
|
|
1249
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
106
|
|
2
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
66
|
|
3
|
|
|
|
|
|
|
|
4
|
|
|
|
|
|
|
package Code::Statistics::Metric::size; |
5
|
|
|
|
|
|
|
{ |
6
|
|
|
|
|
|
|
$Code::Statistics::Metric::size::VERSION = '1.112980'; |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# ABSTRACT: measures the byte size of a target |
10
|
|
|
|
|
|
|
|
11
|
1
|
|
|
1
|
|
6
|
use Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
9
|
|
12
|
|
|
|
|
|
|
extends 'Code::Statistics::Metric'; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
sub measure { |
16
|
76
|
|
|
76
|
1
|
126
|
my ( $class, $target ) = @_; |
17
|
76
|
|
|
|
|
213
|
my $size = length $target->content; |
18
|
76
|
|
|
|
|
12225
|
return $size; |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |
24
|
|
|
|
|
|
|
=pod |
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.112980 |
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
|
|
|
|
|
|
|
This software is Copyright (c) 2010 by Christian Walde. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
This is free software, licensed under: |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE, Version 2, December 2004 |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=cut |
50
|
|
|
|
|
|
|
|