File Coverage

blib/lib/Bio/Tools/EUtilities/EUtilDataI.pm
Criterion Covered Total %
statement 23 28 82.1
branch 5 6 83.3
condition n/a
subroutine 7 11 63.6
pod 4 4 100.0
total 39 49 79.5


line stmt bran cond sub pod time code
1             package Bio::Tools::EUtilities::EUtilDataI;
2             $Bio::Tools::EUtilities::EUtilDataI::VERSION = '1.76';
3 13     13   524471 use utf8;
  13         29  
  13         76  
4 13     13   371 use strict;
  13         23  
  13         253  
5 13     13   57 use warnings;
  13         21  
  13         358  
6 13     13   62 use base qw(Bio::Root::RootI);
  13         26  
  13         1390  
7 13     13   5470 use Text::Wrap qw(wrap);
  13         29672  
  13         3131  
8              
9             # ABSTRACT: EUtil data object interface.
10             # AUTHOR: Chris Fields
11             # OWNER: 2006-2013 Chris Fields
12             # LICENSE: Perl_5
13              
14              
15              
16             {
17             my %VALID_EUTILS = map {$_ => 1} qw(esearch epost espell egquery elink einfo esummary);
18              
19             sub eutil {
20 665     665 1 3342 my ($self, $eutil) = @_;
21 665 100       1362 if ($eutil) {
22 479 50       917 $self->throw("$eutil not supported") if !exists $VALID_EUTILS{$eutil};
23 479         983 return $self->{'_eutil'} = $eutil;
24             }
25 186         489 return $self->{'_eutil'};
26             }
27              
28             }
29              
30              
31             sub datatype {
32 568     568 1 775 my $self = shift;
33 568 100       1379 return $self->{'_type'} = shift if @_;
34 84         263 return $self->{'_type'};
35             }
36              
37              
38             sub rewind {
39 0     0 1   shift->warn("Object may not need an iterator. Please check the documentation.");
40             }
41              
42              
43             sub _add_data {
44 0     0     shift->throw_not_implemented;
45             }
46              
47              
48             sub to_string {
49 0     0 1   shift->throw_not_implemented;
50             }
51              
52              
53             sub _text_wrap {
54 0     0     shift;
55 0           return wrap(@_);
56             }
57              
58             1;
59              
60             __END__