File Coverage

blib/lib/GenOO/RegionCollection/Factory.pm
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1             # POD documentation - main docs before the code
2              
3             =head1 NAME
4              
5             GenOO::RegionCollection::Factory - Factory for creating L<GenOO::RegionCollection> objects
6              
7             =head1 SYNOPSIS
8              
9             # It returns the requested factory implementation
10              
11             my $implementation = GenOO::RegionCollection::Factory->create('Implementation',
12             {
13             ARGUMENT_FOR_IMPLEMENTATION => undef
14             }
15             );
16            
17             =head1 DESCRIPTION
18              
19             It helps to encapsulate the actual factories that handle the creation of the requested objects
20              
21             =head1 EXAMPLES
22              
23             # Create a GFF implementation
24             my $gff_implementation = GenOO::RegionCollection::Factory->create('GFF',
25             {
26             file => 'sample.gff'
27             }
28             );
29            
30             my $bed_implementation = GenOO::RegionCollection::Factory->create('BED',
31             {
32             file => 'sample.bed'
33             }
34             );
35              
36             =cut
37              
38             # Let the code begin...
39              
40             package GenOO::RegionCollection::Factory;
41             $GenOO::RegionCollection::Factory::VERSION = '1.5.2';
42 2     2   973 use MooseX::AbstractFactory;
  2         44762  
  2         9  
43              
44             # Role that the implementations should implement
45             implementation_does [ qw( GenOO::RegionCollection::Factory::Requires ) ];
46              
47             1;