| 1 | package Net::Tomcat::Connector::Statistics; | ||
| 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(max_threads current_thread_count current_thread_busy max_processing_time | |
| 8 | processing_time request_count error_count bytes_received bytes_sent); | ||
| 9 | |||
| 10 | 2 | foreach my $attr ( @ATTR ) {{ | |
| 11 | 2 | ▶ | no strict 'refs'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 0 | ▶ | *{ __PACKAGE__ . "::$attr" } = sub { my $self = shift; return $self->{$attr} } |
|
Subroutine
__ANON__: not called CC=1 SCAR=2.6
| |||
| 13 | 18 | }} | |
| 14 | |||
| 15 | sub new { | ||
| 16 | 0 | ▶ | my ( $class, %args ) = @_; |
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||
| 17 | |||
| 18 | 0 | my $self = bless {}, $class; | |
| 19 | 0 | $self->{$_} = $args{$_} for @ATTR; | |
| 20 | |||
| 21 | 0 | return $self | |
| 22 | } | ||
| 23 | |||
| 24 | 2 | 1; | |
| 25 | __END__ | ||