Hotline/TrackerListItem.pm

filter: Statementstmt 32.0% 8 / 25 Branchbran 0.0% 0 / 12 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 25.0% 2 / 8 Podpod 100% 6 / 6 totaltotal 31.3% 16 / 51 CC 7 SCAR 16.7
CC
7
Cov
22%
new
6.0
address
6.0
port
6.0
CRAP 5.3
« Hotline/Task.pm ↑ Summary Hotline/FileInfoItem.pm »
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
BranchTrueFalseTotal
if (@args == 5) { } 0 0 0
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
BranchTrueFalseTotal
if @_ == 2 0 0 0
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
BranchTrueFalseTotal
if @_ == 2 0 0 0
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
BranchTrueFalseTotal
if @_ == 2 0 0 0
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
BranchTrueFalseTotal
if @_ == 2 0 0 0
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
BranchTrueFalseTotal
if @_ == 2 0 0 0
72 0 return $_[0]->{'DESCRIPTION'};
73 }
74  
75 1 1;
« Hotline/Task.pm ↑ Summary Hotline/FileInfoItem.pm »