line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Tomcat::Connector::Scoreboard::Entry; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
35
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
85
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
7
|
|
|
|
|
|
|
our @ATTR = qw(stage time client vhost request b_sent b_recv); |
8
|
|
|
|
|
|
|
|
9
|
1
|
|
|
|
|
267
|
foreach my $attr ( @ATTR ) {{ |
10
|
1
|
|
|
1
|
|
7
|
no strict 'refs'; |
|
1
|
|
|
|
|
2
|
|
11
|
|
|
|
|
|
|
*{ __PACKAGE__ . "::$attr" } = sub { |
12
|
0
|
|
|
0
|
|
|
my ( $self, $val ) = @_; |
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
13
|
0
|
0
|
|
|
|
|
$self->{$attr} = $val if $val; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
return $self->{$attr} } |
16
|
|
|
|
|
|
|
}} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub new { |
19
|
0
|
|
|
0
|
1
|
|
my ( $class, %args ) = @_; |
20
|
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
22
|
0
|
|
|
|
|
|
$self->{$_} = $args{$_} for @ATTR; |
23
|
|
|
|
|
|
|
|
24
|
0
|
|
|
|
|
|
return $self |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
|
27
|
0
|
|
|
0
|
1
|
|
sub bytes_sent { return $_[0]->{b_sent} } |
28
|
|
|
|
|
|
|
|
29
|
0
|
|
|
0
|
1
|
|
sub bytes_received { return $_[0]->{b_recv} } |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
1; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
__END__ |