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