| 1 | package Net::Tomcat::Connector::Scoreboard::Entry; | ||||||||||
| 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(stage time client vhost request b_sent b_recv); | |||||||||
| 8 | |||||||||||
| 9 | 2 | foreach my $attr ( @ATTR ) {{ | |||||||||
| 10 | 2 | ▶ | no strict 'refs'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 14 | *{ __PACKAGE__ . "::$attr" } = sub { | |||||||||
| 12 | 0 | ▶ | my ( $self, $val ) = @_; | ||||||||
|
Subroutine
__ANON__: not called CC=2 SCAR=17.9
| |||||||||||
| 13 | 0 | ▶ | $self->{$attr} = $val if $val; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | |||||||||||
| 15 | 0 | return $self->{$attr} } | |||||||||
| 16 | 14 | }} | |||||||||
| 17 | |||||||||||
| 18 | sub new { | ||||||||||
| 19 | 0 | ▶ | my ( $class, %args ) = @_; | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 20 | |||||||||||
| 21 | 0 | my $self = bless {}, $class; | |||||||||
| 22 | 0 | $self->{$_} = $args{$_} for @ATTR; | |||||||||
| 23 | |||||||||||
| 24 | 0 | return $self | |||||||||
| 25 | } | ||||||||||
| 26 | |||||||||||
| 27 | 0 | ▶ | sub bytes_sent { return $_[0]->{b_sent} } | ||||||||
|
Subroutine
bytes_sent: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 28 | |||||||||||
| 29 | 0 | ▶ | sub bytes_received { return $_[0]->{b_recv} } | ||||||||
|
Subroutine
bytes_received: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 30 | |||||||||||
| 31 | 2 | 1; | |||||||||
| 32 | |||||||||||
| 33 | __END__ | ||||||||||