Bio-FastParsers
view release on metacpan or search on metacpan
lib/Bio/FastParsers/Blast/Xml/Hit.pm view on Meta::CPAN
package Bio::FastParsers::Blast::Xml::Hit;
# ABSTRACT: NCBI BLAST DTD-derived internal class
$Bio::FastParsers::Blast::Xml::Hit::VERSION = '0.221230';
use Moose;
use namespace::autoclean;
# AUTOGENERATED CODE! DO NOT MODIFY THIS FILE!
use XML::Bare qw(forcearray);
use aliased 'Bio::FastParsers::Blast::Xml::Hsp';
# private attributes
has '_root' => (
is => 'ro',
isa => 'HashRef',
required => 1,
);
has '_parent' => (
is => 'ro',
isa => 'Maybe[Object]',
required => 1,
weak_ref => 1,
);
# public array(s) of composed objects
has 'hsps' => (
traits => ['Array'],
is => 'ro',
isa => 'ArrayRef[Bio::FastParsers::Blast::Xml::Hsp]',
init_arg => undef,
lazy => 1,
builder => '_build_hsps',
handles => {
count_hsps => 'count',
all_hsps => 'elements',
get_hsp => 'get',
next_hsp => 'shift',
},
);
## no critic (ProhibitUnusedPrivateSubroutines)
sub _build_hsps {
my $self = shift;
return [ map { Hsp->new( _root => $_, _parent => $self ) } @{
forcearray $self->_root->{'Hit_hsps'}->{'Hsp'}
} ];
}
## use critic
# public composed object(s)
# public methods
( run in 0.815 second using v1.01-cache-2.11-cpan-5a3173703d6 )