3 # BioPerl module for Bio::Biblio::Book
5 # Please direct questions and support issues to <bioperl-l@bioperl.org>
7 # Cared for by Martin Senger <senger@ebi.ac.uk>
8 # For copyright and disclaimer see below.
10 # POD documentation - main docs before the code
14 Bio::Biblio::Book - Representation of a book
18 $obj = Bio::Biblio::Book->new(-identifier => '123abc',
19 -editor => Bio::Biblio::Person->new
20 (-lastname => 'Loukides'),
21 -isbn => '0-596-00068-5');
24 $obj = Bio::Biblio::Book->new();
25 $obj->isbn ('0-596-00068-5');
29 A storage object for a book.
30 See its place in the class hierarchy in
31 http://www.ebi.ac.uk/~senger/openbqs/images/bibobjects_perl.gif
35 The following attributes are specific to this class
36 (however, you can also set and get all attributes defined in the parent classes):
39 editor type: Bio::Biblio::Provider
51 OpenBQS home page: http://www.ebi.ac.uk/~senger/openbqs/
55 Comments to the Perl client: http://www.ebi.ac.uk/~senger/openbqs/Client_perl.html
63 User feedback is an integral part of the evolution of this and other
64 Bioperl modules. Send your comments and suggestions preferably to
65 the Bioperl mailing list. Your participation is much appreciated.
67 bioperl-l@bioperl.org - General discussion
68 http://bioperl.org/wiki/Mailing_lists - About the mailing lists
72 Please direct usage questions or support issues to the mailing list:
74 I<bioperl-l@bioperl.org>
76 rather than to the module maintainer directly. Many experienced and
77 reponsive experts will be able look at the problem and quickly
78 address it. Please include a thorough description of the problem
79 with code and data examples if at all possible.
83 Report bugs to the Bioperl bug tracking system to help us keep track
84 of the bugs and their resolution. Bug reports can be submitted via the
87 http://bugzilla.open-bio.org/
91 Heikki Lehvaslaiho (heikki-at-bioperl-dot-org),
92 Martin Senger (senger@ebi.ac.uk)
96 Copyright (c) 2002 European Bioinformatics Institute. All Rights Reserved.
98 This module is free software; you can redistribute it and/or modify
99 it under the same terms as Perl itself.
103 This software is provided "as is" without warranty of any kind.
108 # Let the code begin...
111 package Bio
::Biblio
::Book
;
115 use base
qw(Bio::Biblio::Ref);
118 # a closure with a list of allowed attribute names (these names
119 # correspond with the allowed 'get' and 'set' methods); each name also
120 # keep what type the attribute should be (use 'undef' if it is a
127 _editor
=> 'Bio::Biblio::Provider',
134 # return 1 if $attr is allowed to be set/get in this class
136 my ($self, $attr) = @_;
137 exists $_allowed{$attr} or $self->SUPER::_accessible
($attr);
140 # return an expected type of given $attr
142 my ($self, $attr) = @_;
143 if (exists $_allowed{$attr}) {
144 return $_allowed{$attr};
146 return $self->SUPER::_attr_type
($attr);