| 1 | # BioPerl module for Bio::Community::Role::Classified | ||
| 2 | # | ||
| 3 | # Please direct questions and support issues to <bioperl-l@bioperl.org> | ||
| 4 | # | ||
| 5 | # Copyright 2011-2014 Florent Angly <florent.angly@gmail.com> | ||
| 6 | # | ||
| 7 | # You may distribute this module under the same terms as perl itself | ||
| 8 | |||
| 9 | |||
| 10 | =head1 NAME | ||
| 11 | |||
| 12 | Bio::Community::Role::Classified - Role for objects that have a taxonomic classification | ||
| 13 | |||
| 14 | =head1 SYNOPSIS | ||
| 15 | |||
| 16 | package My::Package; | ||
| 17 | |||
| 18 | use Moose; | ||
| 19 | with 'Bio::Community::Role::Classified'; | ||
| 20 | |||
| 21 | # Use the taxon() method as needed | ||
| 22 | # ... | ||
| 23 | |||
| 24 | 1; | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | This role provides the capability to add a taxonomic classification (Bio::Taxon | ||
| 29 | object) to objects of the class that consumes this role. | ||
| 30 | |||
| 31 | =head1 AUTHOR | ||
| 32 | |||
| 33 | Florent Angly L<florent.angly@gmail.com> | ||
| 34 | |||
| 35 | =head1 SUPPORT AND BUGS | ||
| 36 | |||
| 37 | User feedback is an integral part of the evolution of this and other Bioperl | ||
| 38 | modules. Please direct usage questions or support issues to the mailing list, | ||
| 39 | L<bioperl-l@bioperl.org>, rather than to the module maintainer directly. Many | ||
| 40 | experienced and reponsive experts will be able look at the problem and quickly | ||
| 41 | address it. Please include a thorough description of the problem with code and | ||
| 42 | data examples if at all possible. | ||
| 43 | |||
| 44 | If you have found a bug, please report it on the BioPerl bug tracking system | ||
| 45 | to help us keep track the bugs and their resolution: | ||
| 46 | L<https://redmine.open-bio.org/projects/bioperl/> | ||
| 47 | |||
| 48 | =head1 COPYRIGHT | ||
| 49 | |||
| 50 | Copyright 2011-2014 by Florent Angly <florent.angly@gmail.com> | ||
| 51 | |||
| 52 | This library is free software; you can redistribute it and/or modify | ||
| 53 | it under the same terms as Perl itself, either Perl version 5.10.1 or, | ||
| 54 | at your option, any later version of Perl 5 you may have available. | ||
| 55 | |||
| 56 | =head1 APPENDIX | ||
| 57 | |||
| 58 | The rest of the documentation details each of the object | ||
| 59 | methods. Internal methods are usually preceded with a _ | ||
| 60 | |||
| 61 | =cut | ||
| 62 | |||
| 63 | package Bio::Community::Role::Classified; | ||
| 64 | |||
| 65 | 22 | ▶ | use Moose::Role; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 66 | 22 | ▶ | use namespace::autoclean; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 67 | |||
| 68 | |||
| 69 | =head2 taxon | ||
| 70 | |||
| 71 | Usage : my $taxon = $member->taxon(); | ||
| 72 | Function: Get or set a taxon (or species) for this object. | ||
| 73 | Args : A Bio::Taxon object | ||
| 74 | Returns : A Bio::Taxon object | ||
| 75 | |||
| 76 | =cut | ||
| 77 | |||
| 78 | 22 | has taxon => ( | |
| 79 | is => 'rw', | ||
| 80 | isa => 'Maybe[Bio::Taxon]', | ||
| 81 | required => 0, | ||
| 82 | default => undef, | ||
| 83 | init_arg => '-taxon', | ||
| 84 | lazy => 1, | ||
| 85 | ); | ||
| 86 | |||
| 87 | |||
| 88 | 22 | 1; | |