line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Algorithm::Evolutionary; |
2
|
|
|
|
|
|
|
|
3
|
21
|
|
|
21
|
|
177323
|
use Carp qw(croak); |
|
17
|
|
|
|
|
31
|
|
|
17
|
|
|
|
|
3020
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
our $VERSION = '0.80'; # First GitHub version |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
# Preloaded methods go here. |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# A bit of importing magic taken from POE |
10
|
|
|
|
|
|
|
sub import { |
11
|
19
|
|
|
19
|
|
2466
|
my $self = shift; |
12
|
|
|
|
|
|
|
|
13
|
17
|
|
|
|
|
149
|
my @modules = grep(!/^(Op|Indi|Fitness)$/, @_); |
14
|
|
|
|
|
|
|
|
15
|
17
|
|
|
|
|
34
|
my $package = caller(); |
16
|
18
|
|
|
|
|
339
|
my @failed; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Load all the others. |
19
|
17
|
|
|
|
|
26
|
foreach my $module (@modules) { |
20
|
61
|
|
|
|
|
174
|
my $code = "package $package; use Algorithm::Evolutionary::$module;"; |
21
|
|
|
|
|
|
|
# warn $code; |
22
|
21
|
|
|
21
|
|
5848
|
eval($code); |
|
8
|
|
|
19
|
|
16
|
|
|
8
|
|
|
12
|
|
133
|
|
|
19
|
|
|
1
|
|
6200
|
|
|
3
|
|
|
|
|
5
|
|
|
3
|
|
|
|
|
51
|
|
|
12
|
|
|
|
|
3504
|
|
|
3
|
|
|
|
|
9
|
|
|
3
|
|
|
|
|
54
|
|
|
61
|
|
|
|
|
3280
|
|
23
|
61
|
100
|
|
|
|
234
|
if ($@) { |
24
|
45
|
|
|
|
|
4333
|
warn $@; |
25
|
45
|
|
|
|
|
246
|
push(@failed, $module); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
17
|
100
|
|
|
|
12850
|
@failed and croak "could not import qw(" . join(' ', @failed) . ")"; |
30
|
|
|
|
|
|
|
} |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
__END__ |