Tomcat/Server.pm

filter: Statementstmt 66.6% 16 / 24 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 50.0% 3 / 6 Podpod 0.0% 0 / 1 totaltotal 61.2% 19 / 31 SCAR 7.6
CC
2
Cov
67%
new
6.0
__timestamp
2.0
__ANON__
1.3
CRAP 2.1
« Tomcat/JVM.pm ↑ Summary Tomcat/Connector/Statistics.pm »
1 package Net::Tomcat::Server;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 2 our $VERSION = '0.01';
7 2 our @ATTR = qw(jvm_vendor jvm_version os_architecture os_name os_version tomcat_version);
8  
9 2 foreach my $attr ( @ATTR ) {{
10 2 ▶ no strict 'refs';
Subroutine BEGIN: called CC=1 SCAR=0.0
11 0 ▶ *{ __PACKAGE__ . '::' . $attr } = sub { my $self = shift; return $self->{$attr} }
Subroutine __ANON__: not called CC=1 SCAR=2.6
12 12 }}
13  
14 sub new {
15 0 ▶ my ( $class, %args ) = @_;
Subroutine new: not called CC=2 SCAR=17.9
Pod undocumented
16 0 my $self = bless {}, $class;
17 0 $self->{$_} = $args{$_} for @ATTR;
18 0 $self->{__timestamp} = time;
19  
20 0 return $self;
21 }
22  
23 0 ▶sub __timestamp { return $_[0]->{__timestamp} }
Subroutine __timestamp: not called CC=1 SCAR=6.9
24  
25 2 1;
26  
27 __END__
« Tomcat/JVM.pm ↑ Summary Tomcat/Connector/Statistics.pm »