line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Net::Tomcat::Server; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
3
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
29
|
|
4
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
40
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our @ATTR = qw(jvm_vendor jvm_version os_architecture os_name os_version tomcat_version); |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
|
|
137
|
foreach my $attr ( @ATTR ) {{ |
9
|
1
|
|
|
1
|
|
9
|
no strict 'refs'; |
|
1
|
|
|
|
|
1
|
|
10
|
0
|
|
|
0
|
|
|
*{ __PACKAGE__ . '::' . $attr } = sub { my $self = shift; return $self->{$attr} } |
|
0
|
|
|
0
|
|
|
|
11
|
|
|
|
|
|
|
}} |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
sub new { |
14
|
0
|
|
|
0
|
0
|
|
my ( $class, %args ) = @_; |
15
|
0
|
|
|
|
|
|
my $self = bless {}, $class; |
16
|
0
|
|
|
|
|
|
$self->{$_} = $args{$_} for @ATTR; |
17
|
0
|
|
|
|
|
|
$self->{__timestamp} = time; |
18
|
|
|
|
|
|
|
|
19
|
0
|
|
|
|
|
|
return $self; |
20
|
|
|
|
|
|
|
} |
21
|
|
|
|
|
|
|
|
22
|
0
|
|
|
0
|
|
|
sub __timestamp { return $_[0]->{__timestamp} } |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
1; |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
__END__ |