« lib/POE/Component/Algorithm/Evolutionary.pm
↑ Summary
lib/POE/Component/Algorithm/Evolutionary/Island/POEtic.pm »
| 1 | package POE::Component::Algorithm::Evolutionary::Island; | ||||||||||||
| 2 | |||||||||||||
| 3 | 1 | ▶ | use lib qw( ../../../../../Algorithm-Evolutionary/lib ../Algorithm-Evolutionary/lib ); #For development and perl syntax mode | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 4 | |||||||||||||
| 5 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 7 | 1 | ▶ | use Carp; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | |||||||||||||
| 9 | 1 | our $VERSION = sprintf "%d.%03d", q$Revision: 1.3 $ =~ /(\d+)\.(\d+)/g; | |||||||||||
| 10 | |||||||||||||
| 11 | 1 | ▶ | use POE; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 12 | 1 | ▶ | use base 'POE::Component::Algorithm::Evolutionary'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 13 | |||||||||||||
| 14 | # Module implementation here | ||||||||||||
| 15 | 0 | ▶ | sub new { | ||||||||||
|
Subroutine
new: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||
| 16 | 0 | my $class = shift; | |||||||||||
| 17 | 0 | my %arg = @_; | |||||||||||
| 18 | 0 | my $self = $class->SUPER::new( %arg ); | |||||||||||
| 19 | 0 | ▶ | $self->{'peers'} = delete $arg{'Peers'} || croak "Need a list of peers"; | ||||||||||
|
Condition0%0/2
delete $arg{'Peers'} || croak('Need a list of peers')
MC/DC0%0/1
delete $arg{'Peers'} || croak('Need a list of peers')
delete $arg{'Peers'}
Truth table0%0/2
A
A= delete $arg{'Peers'}
| |||||||||||||
| 20 | 0 | return $self; | |||||||||||
| 21 | } | ||||||||||||
| 22 | |||||||||||||
| 23 | 0 | ▶ | sub start { | ||||||||||
|
Subroutine
start: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 24 | 0 | my $self = shift; | |||||||||||
| 25 | 0 | _start_base( @_ ); | |||||||||||
| 26 | 0 | $_[HEAP]->{'peers'} = $self->{'peers'}; | |||||||||||
| 27 | 0 | $_[KERNEL]->yield('generation'); | |||||||||||
| 28 | } | ||||||||||||
| 29 | |||||||||||||
| 30 | |||||||||||||
| 31 | 1 | "Don't look further" ; # Magic true value required at end of module | |||||||||||
| 32 | __END__ | ||||||||||||