| 1 | package POE::Component::Algorithm::Evolutionary::Island::POEtic; | ||
| 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.2 $ =~ /(\d+)\.(\d+)/g; | |
| 10 | |||
| 11 | 1 | ▶ | use POE; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 12 | 1 | ▶ | use base 'POE::Component::Algorithm::Evolutionary::Island'; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 13 | |||
| 14 | # Module implementation here | ||
| 15 | 0 | ▶ | sub new { |
|
Subroutine
new: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 16 | 0 | my $class = shift; | |
| 17 | 0 | my %arg = @_; | |
| 18 | 0 | $arg{'After_Step'} = \&after_step; | |
| 19 | 0 | my $self = $class->SUPER::new( %arg ); | |
| 20 | 0 | return $self; | |
| 21 | } | ||
| 22 | |||
| 23 | 0 | ▶ | sub after_step { |
|
Subroutine
after_step: not called CC=2 SCAR=17.9
Pod
documented
| |||
| 24 | 0 | my ($kernel, $heap, $arg ) = @_[KERNEL, HEAP, ARG0]; | |
| 25 | 0 | for my $node ( @{$heap->{'peers'}} ) { #Sessions by name | |
| 26 | 0 | $kernel->post($node, 'new_population', [$heap->{'population'}->[0]] ); | |
| 27 | } | ||
| 28 | } | ||
| 29 | |||
| 30 | |||
| 31 | 1 | "No man is an island" ; # Magic true value required at end of module | |
| 32 | __END__ | ||