line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Bio::Phylo::Util::IDPool; |
2
|
57
|
|
|
57
|
|
355
|
use strict; |
|
57
|
|
|
|
|
102
|
|
|
57
|
|
|
|
|
6534
|
|
3
|
|
|
|
|
|
|
{ |
4
|
|
|
|
|
|
|
my @reclaim; |
5
|
|
|
|
|
|
|
my $obj_counter = 1; |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub _initialize { |
8
|
12044
|
|
|
12044
|
|
16903
|
my $obj_ID = 0; |
9
|
12044
|
50
|
|
|
|
21975
|
if (@reclaim) { |
10
|
0
|
|
|
|
|
0
|
$obj_ID = shift(@reclaim); |
11
|
|
|
|
|
|
|
} |
12
|
|
|
|
|
|
|
else { |
13
|
12044
|
|
|
|
|
16310
|
$obj_ID = $obj_counter; |
14
|
12044
|
|
|
|
|
15059
|
$obj_counter++; |
15
|
|
|
|
|
|
|
} |
16
|
12044
|
|
|
|
|
22909
|
return \$obj_ID; |
17
|
|
|
|
|
|
|
} |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
sub _reclaim { |
20
|
12044
|
|
|
12044
|
|
68159
|
my ( $class, $obj ) = @_; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
# push @reclaim, $obj->get_id; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
sub _reset { |
26
|
0
|
|
|
0
|
|
|
$obj_counter = 1; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
__END__ |