bug 2549; fixed small bug in Bio::Taxon which doesn't catch -common_name
[bioperl-live.git] / Bio / Expression / Contact.pm
blobfa6aa04617cba60ada49ca2c379157b99359529c
1 # $Id$
3 # BioPerl module for Bio::Expression::Contact
5 # Cared for by Allen Day <allenday@ucla.edu>
7 # Copyright Allen Day
9 # You may distribute this module under the same terms as perl itself
11 # POD documentation - main docs before the code
13 =head1 NAME
15 Bio::Expression::Contact - DESCRIPTION of Object
17 =head1 SYNOPSIS
19 Give standard usage here
21 =head1 DESCRIPTION
23 Describe the object here
25 =head1 FEEDBACK
27 =head2 Mailing Lists
29 User feedback is an integral part of the evolution of this and other
30 Bioperl modules. Send your comments and suggestions preferably to
31 the Bioperl mailing list. Your participation is much appreciated.
33 bioperl-l@bioperl.org - General discussion
34 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
36 =head2 Reporting Bugs
38 Report bugs to the Bioperl bug tracking system to help us keep track
39 of the bugs and their resolution. Bug reports can be submitted via
40 the web:
42 http://bugzilla.open-bio.org/
44 =head1 AUTHOR - Allen Day
46 Email allenday@ucla.edu
48 =head1 APPENDIX
50 The rest of the documentation details each of the object methods.
51 Internal methods are usually preceded with a _
53 =cut
56 # Let the code begin...
59 package Bio::Expression::Contact;
60 use strict;
61 use base qw(Bio::Root::Root);
63 =head2 new()
65 Usage : my $obj = Bio::Expression::Contact->new();
66 Function: Builds a new Bio::Expression::Contact object
67 Returns : an instance of Bio::Expression::Contact
68 Args :
71 =cut
73 sub new {
74 my($class,@args) = @_;
76 my $self = $class->SUPER::new(@args);
77 $self->_initialize(@args);
78 return $self;
81 =head2 _initialize()
83 Usage : $obj->_initialize(%arg);
84 Function: Internal method to initialize a new Bio::Expression::Contact object
85 Returns : true on success
86 Args : passed through to new()
88 =cut
90 sub _initialize {
91 my($self,%arg) = @_;
93 foreach my $arg (keys %arg){
94 my $marg = $arg;
95 $marg =~ s/^-//;
96 $self->$marg($arg{$arg}) if $self->can($marg);
99 return 1;
102 =head2 source()
104 Usage : $obj->source($newval)
105 Function:
106 Example :
107 Returns : value of source (a scalar)
108 Args : on set, new value (a scalar or undef, optional)
111 =cut
113 sub source {
114 my($self,$val) = @_;
115 $self->{'source'} = $val if defined($val);
116 return $self->{'source'};
119 =head2 accession()
121 Usage : $obj->accession($newval)
122 Function:
123 Example :
124 Returns : value of accession (a scalar)
125 Args : on set, new value (a scalar or undef, optional)
128 =cut
130 sub accession {
131 my($self,$val) = @_;
132 $self->{'accession'} = $val if defined($val);
133 return $self->{'accession'};
136 =head2 name()
138 Usage : $obj->name($newval)
139 Function:
140 Example :
141 Returns : value of name (a scalar)
142 Args : on set, new value (a scalar or undef, optional)
145 =cut
147 sub name {
148 my($self,$val) = @_;
149 $self->{'name'} = $val if defined($val);
150 return $self->{'name'};
153 =head2 db()
155 Usage : $obj->db($newval)
156 Function:
157 Example :
158 Returns : value of db (a scalar)
159 Args : on set, new value (a scalar or undef, optional)
162 =cut
164 sub db {
165 my($self,$val) = @_;
166 $self->{'db'} = $val if defined($val);
167 return $self->{'db'};