| 1 | package Net::Hotline::TrackerListItem; | ||||||||||
| 2 | |||||||||||
| 3 | ## Copyright(c) 1998-2002 by John C. Siracusa. All rights reserved. This | ||||||||||
| 4 | ## program is free software; you can redistribute it and/or modify it under | ||||||||||
| 5 | ## the same terms as Perl itself. | ||||||||||
| 6 | |||||||||||
| 7 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use vars qw($VERSION); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 1 | $VERSION = '0.80'; | |||||||||
| 12 | |||||||||||
| 13 | sub new | ||||||||||
| 14 | 0 | ▶ | { | ||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 15 | 0 | my($class, @args) = @_; | |||||||||
| 16 | 0 | my($self); | |||||||||
| 17 | |||||||||||
| 18 | 0 | ▶ | if(@args == 5) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 19 | { | ||||||||||
| 20 | 0 | $self = | |||||||||
| 21 | { | ||||||||||
| 22 | 'ADDRESS' => $args[0], | ||||||||||
| 23 | 'PORT' => $args[1], | ||||||||||
| 24 | 'NUM_USERS' => $args[2], | ||||||||||
| 25 | 'NAME' => $args[3], | ||||||||||
| 26 | 'DESCRIPTION' => $args[4] | ||||||||||
| 27 | }; | ||||||||||
| 28 | } | ||||||||||
| 29 | else | ||||||||||
| 30 | { | ||||||||||
| 31 | 0 | $self = | |||||||||
| 32 | { | ||||||||||
| 33 | 'ADDRESS' => undef, | ||||||||||
| 34 | 'PORT' => undef, | ||||||||||
| 35 | 'NUM_USERS' => undef, | ||||||||||
| 36 | 'NAME' => undef, | ||||||||||
| 37 | 'DESCRIPTION' => undef | ||||||||||
| 38 | }; | ||||||||||
| 39 | } | ||||||||||
| 40 | |||||||||||
| 41 | 0 | bless $self, $class; | |||||||||
| 42 | 0 | return $self; | |||||||||
| 43 | } | ||||||||||
| 44 | |||||||||||
| 45 | sub address | ||||||||||
| 46 | 0 | ▶ | { | ||||||||
|
Subroutine
address: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 47 | 0 | ▶ | $_[0]->{'ADDRESS'} = $_[1] if(@_ == 2); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 48 | 0 | return $_[0]->{'ADDRESS'}; | |||||||||
| 49 | } | ||||||||||
| 50 | |||||||||||
| 51 | sub port | ||||||||||
| 52 | 0 | ▶ | { | ||||||||
|
Subroutine
port: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 53 | 0 | ▶ | $_[0]->{'PORT'} = $_[1] if(@_ == 2); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 54 | 0 | return $_[0]->{'PORT'}; | |||||||||
| 55 | } | ||||||||||
| 56 | |||||||||||
| 57 | sub num_users | ||||||||||
| 58 | 0 | ▶ | { | ||||||||
|
Subroutine
num_users: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 59 | 0 | ▶ | $_[0]->{'NUM_USERS'} = $_[1] if(@_ == 2); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 60 | 0 | return $_[0]->{'NUM_USERS'}; | |||||||||
| 61 | } | ||||||||||
| 62 | |||||||||||
| 63 | sub name | ||||||||||
| 64 | 0 | ▶ | { | ||||||||
|
Subroutine
name: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 65 | 0 | ▶ | $_[0]->{'NAME'} = $_[1] if(@_ == 2); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 66 | 0 | return $_[0]->{'NAME'}; | |||||||||
| 67 | } | ||||||||||
| 68 | |||||||||||
| 69 | sub description | ||||||||||
| 70 | 0 | ▶ | { | ||||||||
|
Subroutine
description: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||
| 71 | 0 | ▶ | $_[0]->{'DESCRIPTION'} = $_[1] if(@_ == 2); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 72 | 0 | return $_[0]->{'DESCRIPTION'}; | |||||||||
| 73 | } | ||||||||||
| 74 | |||||||||||
| 75 | 1 | 1; | |||||||||