| 1 | # | ||
| 2 | # BioPerl module for Bio::Factory::ObjectFactoryI | ||
| 3 | # | ||
| 4 | # Please direct questions and support issues to <bioperl-l@bioperl.org> | ||
| 5 | # | ||
| 6 | # Cared for by Jason Stajich <jason@bioperl.org> | ||
| 7 | # | ||
| 8 | # Copyright Jason Stajich | ||
| 9 | # | ||
| 10 | # You may distribute this module under the same terms as perl itself | ||
| 11 | |||
| 12 | # POD documentation - main docs before the code | ||
| 13 | |||
| 14 | =head1 NAME | ||
| 15 | |||
| 16 | Bio::Factory::ObjectFactoryI - A General object creator factory | ||
| 17 | |||
| 18 | =head1 SYNOPSIS | ||
| 19 | |||
| 20 | # see the implementations of this interface for details but | ||
| 21 | # basically | ||
| 22 | |||
| 23 | my $obj = $factory->create(%args); | ||
| 24 | |||
| 25 | =head1 DESCRIPTION | ||
| 26 | |||
| 27 | This interface is the basic structure for a factory which creates new | ||
| 28 | objects. In this case it is up to the implementer to check arguments | ||
| 29 | and initialize whatever new object the implementing class is designed for. | ||
| 30 | |||
| 31 | =head1 FEEDBACK | ||
| 32 | |||
| 33 | =head2 Mailing Lists | ||
| 34 | |||
| 35 | User feedback is an integral part of the evolution of this and other | ||
| 36 | Bioperl modules. Send your comments and suggestions preferably to | ||
| 37 | the Bioperl mailing list. Your participation is much appreciated. | ||
| 38 | |||
| 39 | bioperl-l@bioperl.org - General discussion | ||
| 40 | http://bioperl.org/wiki/Mailing_lists - About the mailing lists | ||
| 41 | |||
| 42 | =head2 Support | ||
| 43 | |||
| 44 | Please direct usage questions or support issues to the mailing list: | ||
| 45 | |||
| 46 | I<bioperl-l@bioperl.org> | ||
| 47 | |||
| 48 | rather than to the module maintainer directly. Many experienced and | ||
| 49 | reponsive experts will be able look at the problem and quickly | ||
| 50 | address it. Please include a thorough description of the problem | ||
| 51 | with code and data examples if at all possible. | ||
| 52 | |||
| 53 | =head2 Reporting Bugs | ||
| 54 | |||
| 55 | Report bugs to the Bioperl bug tracking system to help us keep track | ||
| 56 | of the bugs and their resolution. Bug reports can be submitted via the | ||
| 57 | web: | ||
| 58 | |||
| 59 | https://github.com/bioperl/bioperl-live/issues | ||
| 60 | |||
| 61 | =head1 AUTHOR - Jason Stajich | ||
| 62 | |||
| 63 | Email jason@bioperl.org | ||
| 64 | |||
| 65 | =head1 APPENDIX | ||
| 66 | |||
| 67 | The rest of the documentation details each of the object methods. | ||
| 68 | Internal methods are usually preceded with a _ | ||
| 69 | |||
| 70 | =cut | ||
| 71 | |||
| 72 | |||
| 73 | # Let the code begin... | ||
| 74 | |||
| 75 | |||
| 76 | package Bio::Factory::ObjectFactoryI; | ||
| 77 | 322 | $Bio::Factory::ObjectFactoryI::VERSION = '1.7.8'; | |
| 78 | 322 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 79 | 322 | ▶ | use Carp; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 80 | |||
| 81 | 322 | ▶ | use base qw(Bio::Root::RootI); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 82 | |||
| 83 | =head2 create | ||
| 84 | |||
| 85 | Title : create | ||
| 86 | Usage : $factory->create(%args) | ||
| 87 | Function: Create a new object | ||
| 88 | Returns : a new object | ||
| 89 | Args : hash of initialization parameters | ||
| 90 | |||
| 91 | |||
| 92 | =cut | ||
| 93 | |||
| 94 | 0 | ▶ | sub create{ |
|
Subroutine
create: not called CC=1 SCAR=6.9
Pod
documented
| |||
| 95 | 0 | my ($self,@args) = @_; | |
| 96 | 0 | $self->throw_not_implemented(); | |
| 97 | } | ||
| 98 | |||
| 99 | =head2 create_object | ||
| 100 | |||
| 101 | Title : create_object | ||
| 102 | Usage : $obj = $factory->create_object(%args) | ||
| 103 | Function: Create a new object. | ||
| 104 | |||
| 105 | This is supposed to supersede create(). Right now it only delegates | ||
| 106 | to create(). | ||
| 107 | Returns : a new object | ||
| 108 | Args : hash of initialization parameters | ||
| 109 | |||
| 110 | |||
| 111 | =cut | ||
| 112 | |||
| 113 | 331 | ▶ | sub create_object{ |
|
Subroutine
create_object: called CC=1 SCAR=0.0
Pod
documented
| |||
| 114 | 331 | my ($self,@args) = @_; | |
| 115 | 331 | return $self->create(@args); | |
| 116 | } | ||
| 117 | |||
| 118 | 322 | 1; | |