| 1 | package Bio::Tools::EUtilities::History; | ||||||||||||||||||||||||||||
| 2 | BEGIN { | ||||||||||||||||||||||||||||
| 3 | 6 | ▶ | $Bio::Tools::EUtilities::History::AUTHORITY = 'cpan:BIOPERLML'; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 4 | } | ||||||||||||||||||||||||||||
| 5 | { | ||||||||||||||||||||||||||||
| 6 | 6 | $Bio::Tools::EUtilities::History::VERSION = '1.73'; | |||||||||||||||||||||||||||
| 7 | } | ||||||||||||||||||||||||||||
| 8 | 6 | ▶ | use utf8; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 6 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 6 | ▶ | use warnings; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | 6 | ▶ | use base qw(Bio::Root::Root Bio::Tools::EUtilities::HistoryI); | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 12 | |||||||||||||||||||||||||||||
| 13 | # ABSTRACT: Lightweight implementation of HistoryI interface (not bound to filehandles, extraneous methods, etc). | ||||||||||||||||||||||||||||
| 14 | # AUTHOR: Chris Fields <cjfields@bioperl.org> | ||||||||||||||||||||||||||||
| 15 | # OWNER: 2006-2013 Chris Fields | ||||||||||||||||||||||||||||
| 16 | # LICENSE: Perl_5 | ||||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||
| 19 | |||||||||||||||||||||||||||||
| 20 | sub new { | ||||||||||||||||||||||||||||
| 21 | 2 | ▶ | my ($class, @args) = @_; | ||||||||||||||||||||||||||
|
Subroutine
new: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||||
| 22 | 2 | my $self = $class->SUPER::new(@args); | |||||||||||||||||||||||||||
| 23 | 2 | my ($eutil) = $self->_rearrange([qw(eutil)],@args); | |||||||||||||||||||||||||||
| 24 | 2 | ▶ | $eutil || $self->throw('eutil not defined'); | ||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||
| 25 | 2 | $self->eutil($eutil); | |||||||||||||||||||||||||||
| 26 | 2 | $self->datatype('history'); | |||||||||||||||||||||||||||
| 27 | 2 | return $self; | |||||||||||||||||||||||||||
| 28 | } | ||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||
| 30 | |||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||
| 32 | |||||||||||||||||||||||||||||
| 33 | sub _add_data { | ||||||||||||||||||||||||||||
| 34 | 2 | ▶ | my ($self, $simple) = @_; | ||||||||||||||||||||||||||
|
Subroutine
_add_data: called CC=5 SCAR=21.6
| |||||||||||||||||||||||||||||
| 35 | 2 | ▶ | if (!exists $simple->{WebEnv} || !exists $simple->{QueryKey}) { | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition33%1/3
exists $simple->{"WebEnv"} and exists $simple->{"QueryKey"}
MC/DC0%0/2
exists $simple->{"WebEnv"} and exists $simple->{"QueryKey"}
exists $simple->{"WebEnv"}
exists $simple->{"QueryKey"}
Truth table33%1/3
A and B
A= exists $simple->{"WebEnv"}B= exists $simple->{"QueryKey"}
| |||||||||||||||||||||||||||||
| 36 | 0 | $self->debug("Data:",Dumper($simple)); | |||||||||||||||||||||||||||
| 37 | 0 | $self->throw("Missing webenv/query key in history output"); | |||||||||||||||||||||||||||
| 38 | } | ||||||||||||||||||||||||||||
| 39 | 2 | ▶ | $self->{_webenv} = $simple->{WebEnv} && delete $simple->{WebEnv}; | ||||||||||||||||||||||||||
|
Condition33%1/3
$simple->{'WebEnv'} && delete $simple->{'WebEnv'}
MC/DC0%0/2
$simple->{'WebEnv'} && delete $simple->{'WebEnv'}
$simple->{'WebEnv'}
delete $simple->{'WebEnv'}
Truth table33%1/3
A && B
A= $simple->{'WebEnv'}B= delete $simple->{'WebEnv'}
| |||||||||||||||||||||||||||||
| 40 | 2 | ▶ | $self->{_querykey} = $simple->{QueryKey} && delete $simple->{QueryKey}; | ||||||||||||||||||||||||||
|
Condition33%1/3
$simple->{'QueryKey'} && delete $simple->{'QueryKey'}
MC/DC0%0/2
$simple->{'QueryKey'} && delete $simple->{'QueryKey'}
$simple->{'QueryKey'}
delete $simple->{'QueryKey'}
Truth table33%1/3
A && B
A= $simple->{'QueryKey'}B= delete $simple->{'QueryKey'}
| |||||||||||||||||||||||||||||
| 41 | } | ||||||||||||||||||||||||||||
| 42 | |||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | sub to_string { | ||||||||||||||||||||||||||||
| 45 | 0 | ▶ | my $self = shift; | ||||||||||||||||||||||||||
|
Subroutine
to_string: not called CC=2 SCAR=17.9
Pod
documented
| |||||||||||||||||||||||||||||
| 46 | 0 | my $string; | |||||||||||||||||||||||||||
| 47 | 0 | my %map = ( | |||||||||||||||||||||||||||
| 48 | 'get_webenv' => 'WebEnv', | ||||||||||||||||||||||||||||
| 49 | 'get_query_key' => 'Key' | ||||||||||||||||||||||||||||
| 50 | ); | ||||||||||||||||||||||||||||
| 51 | 0 | for my $m (qw(get_webenv get_query_key)) { | |||||||||||||||||||||||||||
| 52 | 0 | $string .= sprintf("%-20s:%s\n", $map{$m}, $self->$m); | |||||||||||||||||||||||||||
| 53 | } | ||||||||||||||||||||||||||||
| 54 | 0 | return $string; | |||||||||||||||||||||||||||
| 55 | } | ||||||||||||||||||||||||||||
| 56 | |||||||||||||||||||||||||||||
| 57 | 6 | 1; | |||||||||||||||||||||||||||
| 58 | |||||||||||||||||||||||||||||
| 59 | __END__ | ||||||||||||||||||||||||||||