line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# POD documentation - main docs before the code |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
GenOO::RegionCollection - Role for a collection of GenOO::Region objects |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 SYNOPSIS |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# This role defines the interface for collections of L<GenOO::Region> objects |
10
|
|
|
|
|
|
|
# Cannot be initialized |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
=head1 DESCRIPTION |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
This role defines the interface for collections of L<GenOO::Region> objects. |
15
|
|
|
|
|
|
|
All required attributes and subs must be present in classes that consume |
16
|
|
|
|
|
|
|
this role. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
=cut |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
# Let the code begin... |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
package GenOO::RegionCollection; |
23
|
|
|
|
|
|
|
$GenOO::RegionCollection::VERSION = '1.5.1'; |
24
|
2
|
|
|
2
|
|
1185
|
use Moose::Role; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
15
|
|
25
|
2
|
|
|
2
|
|
7136
|
use namespace::autoclean; |
|
2
|
|
|
|
|
4
|
|
|
2
|
|
|
|
|
16
|
|
26
|
2
|
|
|
2
|
|
473
|
use GenOO::RegionCollection::Factory; |
|
2
|
|
|
|
|
7
|
|
|
2
|
|
|
|
|
232
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
requires qw ( |
29
|
|
|
|
|
|
|
name |
30
|
|
|
|
|
|
|
species |
31
|
|
|
|
|
|
|
description |
32
|
|
|
|
|
|
|
longest_record |
33
|
|
|
|
|
|
|
add_record |
34
|
|
|
|
|
|
|
foreach_record_do |
35
|
|
|
|
|
|
|
records_count |
36
|
|
|
|
|
|
|
strands |
37
|
|
|
|
|
|
|
rnames_for_strand |
38
|
|
|
|
|
|
|
rnames_for_all_strands |
39
|
|
|
|
|
|
|
is_empty |
40
|
|
|
|
|
|
|
is_not_empty |
41
|
|
|
|
|
|
|
foreach_contained_record_do |
42
|
|
|
|
|
|
|
records_contained_in_region |
43
|
|
|
|
|
|
|
); |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
####################################################################### |
46
|
|
|
|
|
|
|
######################## Class Methods ######################## |
47
|
|
|
|
|
|
|
####################################################################### |
48
|
|
|
|
|
|
|
sub create_from { |
49
|
1
|
|
|
1
|
0
|
4441
|
my ($class, @attributes) = @_; |
50
|
1
|
|
|
|
|
8
|
return GenOO::RegionCollection::Factory->create(@attributes)->read_collection; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
1; |