File Coverage

blib/lib/Net/Tomcat/Connector/Statistics.pm
Criterion Covered Total %
statement 9 15 60.0
branch n/a
condition n/a
subroutine 3 9 33.3
pod 1 1 100.0
total 13 25 52.0


line stmt bran cond sub pod time code
1             package Net::Tomcat::Connector::Statistics;
2              
3 1     1   4 use strict;
  1         2  
  1         40  
4 1     1   5 use warnings;
  1         2  
  1         78  
5              
6             our $VERSION = '0.01';
7             our @ATTR = qw(max_threads current_thread_count current_thread_busy max_processing_time
8             processing_time request_count error_count bytes_received bytes_sent);
9              
10 1         139 foreach my $attr ( @ATTR ) {{
11 1     1   5 no strict 'refs';
  1         1  
12 0     0     *{ __PACKAGE__ . "::$attr" } = sub { my $self = shift; return $self->{$attr} }
  0     0      
        0      
        0      
        0      
13             }}
14              
15             sub new {
16 0     0 1   my ( $class, %args ) = @_;
17              
18 0           my $self = bless {}, $class;
19 0           $self->{$_} = $args{$_} for @ATTR;
20            
21 0           return $self
22             }
23              
24             1;
25             __END__