| 1 | package Net::Peep::Client::Sysmonitor::Proc; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 2 | require 5.00503; | |||||||||||||||||||
| 4 | 2 | ▶ | use strict; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 5 | # use warnings; # commented out for 5.005 compatibility | ||||||||||||||||||||
| 6 | 2 | ▶ | use Carp; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | 2 | ▶ | use Data::Dumper; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 8 | 2 | ▶ | use Net::Peep::Host::Pool; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 9 | |||||||||||||||||||||
| 10 | 2 | require Exporter; | |||||||||||||||||||
| 11 | |||||||||||||||||||||
| 12 | 2 | ▶ | use vars qw{ @ISA %EXPORT_TAGS @EXPORT_OK @EXPORT $VERSION }; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | 2 | @ISA = qw(Exporter); | |||||||||||||||||||
| 15 | 2 | %EXPORT_TAGS = ( 'all' => [ qw( ) ] ); | |||||||||||||||||||
| 16 | 2 | @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } ); | |||||||||||||||||||
| 17 | 2 | @EXPORT = qw( ); | |||||||||||||||||||
| 18 | 2 | $VERSION = do { my @r = (q$Revision: 1.1 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; | |||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | 0 | ▶ | sub new { | ||||||||||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 21 | |||||||||||||||||||||
| 22 | 0 | my $self = shift; | |||||||||||||||||||
| 23 | 0 | ▶ | my $class = ref($self) || $self; | ||||||||||||||||||
|
Condition0%0/3
ref $self || $self
MC/DC0%0/2
ref $self || $self
ref $self
$self
Truth table0%0/3
A || B
A= ref $selfB= $self
| |||||||||||||||||||||
| 24 | 0 | my $this = {}; | |||||||||||||||||||
| 25 | 0 | bless $this, $class; | |||||||||||||||||||
| 26 | |||||||||||||||||||||
| 27 | } # end sub new | ||||||||||||||||||||
| 28 | |||||||||||||||||||||
| 29 | 0 | ▶ | sub name { | ||||||||||||||||||
|
Subroutine
name: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 30 | |||||||||||||||||||||
| 31 | 0 | my $self = shift; | |||||||||||||||||||
| 32 | 0 | ▶ | if (@_) { $self->{'NAME'} = shift; } | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 33 | 0 | return $self->{'NAME'}; | |||||||||||||||||||
| 34 | |||||||||||||||||||||
| 35 | } # end sub name | ||||||||||||||||||||
| 36 | |||||||||||||||||||||
| 37 | 0 | ▶ | sub event { | ||||||||||||||||||
|
Subroutine
event: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 38 | |||||||||||||||||||||
| 39 | 0 | my $self = shift; | |||||||||||||||||||
| 40 | 0 | ▶ | if (@_) { $self->{'EVENT'} = shift; } | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 41 | 0 | return $self->{'EVENT'}; | |||||||||||||||||||
| 42 | |||||||||||||||||||||
| 43 | } # end sub event | ||||||||||||||||||||
| 44 | |||||||||||||||||||||
| 45 | 0 | ▶ | sub max { | ||||||||||||||||||
|
Subroutine
max: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | 0 | my $self = shift; | |||||||||||||||||||
| 48 | 0 | ▶ | if (@_) { $self->{'MAX'} = shift; } | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 49 | 0 | return $self->{'MAX'}; | |||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | } # end sub max | ||||||||||||||||||||
| 52 | |||||||||||||||||||||
| 53 | 0 | ▶ | sub min { | ||||||||||||||||||
|
Subroutine
min: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 54 | |||||||||||||||||||||
| 55 | 0 | my $self = shift; | |||||||||||||||||||
| 56 | 0 | ▶ | if (@_) { $self->{'MIN'} = shift; } | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 57 | 0 | return $self->{'MIN'}; | |||||||||||||||||||
| 58 | |||||||||||||||||||||
| 59 | } # end sub min | ||||||||||||||||||||
| 60 | |||||||||||||||||||||
| 61 | 0 | ▶ | sub location { | ||||||||||||||||||
|
Subroutine
location: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 62 | |||||||||||||||||||||
| 63 | 0 | my $self = shift; | |||||||||||||||||||
| 64 | 0 | ▶ | if (@_) { $self->{'LOCATION'} = shift; } | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 65 | 0 | return $self->{'LOCATION'}; | |||||||||||||||||||
| 66 | |||||||||||||||||||||
| 67 | } # end sub location | ||||||||||||||||||||
| 68 | |||||||||||||||||||||
| 69 | 0 | ▶ | sub priority { | ||||||||||||||||||
|
Subroutine
priority: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 70 | |||||||||||||||||||||
| 71 | 0 | my $self = shift; | |||||||||||||||||||
| 72 | 0 | ▶ | if (@_) { $self->{'PRIORITY'} = shift; } | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 73 | 0 | return $self->{'PRIORITY'}; | |||||||||||||||||||
| 74 | |||||||||||||||||||||
| 75 | } # end sub priority | ||||||||||||||||||||
| 76 | |||||||||||||||||||||
| 77 | 0 | ▶ | sub notification { | ||||||||||||||||||
|
Subroutine
notification: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 78 | |||||||||||||||||||||
| 79 | 0 | my $self = shift; | |||||||||||||||||||
| 80 | 0 | ▶ | if (@_) { $self->{'NOTIFICATION'} = shift; } | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 81 | 0 | return $self->{'NOTIFICATION'}; | |||||||||||||||||||
| 82 | |||||||||||||||||||||
| 83 | } # end sub notification | ||||||||||||||||||||
| 84 | |||||||||||||||||||||
| 85 | 0 | ▶ | sub hosts { | ||||||||||||||||||
|
Subroutine
hosts: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 86 | |||||||||||||||||||||
| 87 | 0 | my $self = shift; | |||||||||||||||||||
| 88 | 0 | ▶ | if (@_) { $self->{'HOSTS'} = shift; } | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 89 | 0 | return $self->{'HOSTS'}; | |||||||||||||||||||
| 90 | |||||||||||||||||||||
| 91 | } # end sub hosts | ||||||||||||||||||||
| 92 | |||||||||||||||||||||
| 93 | 0 | ▶ | sub pool { | ||||||||||||||||||
|
Subroutine
pool: not called CC=3 SCAR=24.8
Pod
undocumented
| |||||||||||||||||||||
| 94 | |||||||||||||||||||||
| 95 | 0 | my $self = shift; | |||||||||||||||||||
| 96 | 0 | ▶ | unless (exists $self->{'POOL'}) { | ||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||
| 97 | 0 | ▶ | my $hosts = $self->hosts() | ||||||||||||||||||
|
Condition0%0/2
$self->hosts || confess('Cannot get host pool: No hosts have been identified yet.')
MC/DC0%0/1
$self->hosts || confess('Cannot get host pool: No hosts have been identified yet.')
$self->hosts
Truth table0%0/2
A
A= $self->hosts
| |||||||||||||||||||||
| 98 | || confess "Cannot get host pool: No hosts have been identified yet."; | ||||||||||||||||||||
| 99 | 0 | my $pool = new Net::Peep::Host::Pool; | |||||||||||||||||||
| 100 | 0 | $pool->addHosts($hosts); | |||||||||||||||||||
| 101 | 0 | $self->{'POOL'} = $pool; | |||||||||||||||||||
| 102 | } | ||||||||||||||||||||
| 103 | 0 | return $self->{'POOL'}; | |||||||||||||||||||
| 104 | |||||||||||||||||||||
| 105 | } # end sub pool | ||||||||||||||||||||
| 106 | |||||||||||||||||||||
| 107 | 2 | 1; | |||||||||||||||||||
| 108 | |||||||||||||||||||||
| 109 | __END__ | ||||||||||||||||||||