Installer/TCoffee.pm

filter: Statementstmt 55.0% 22 / 40 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 70.0% 7 / 10 Podpod 100% 2 / 2 totaltotal 55.3% 31 / 56 SCAR 14.2
CC
3
Cov
50%
_execute_tcoffee_install_script
12.0
get_default
2.0
install
2.0
CRAP 4.1
« Tools/Run/Alignment/TCoffee.pm ↑ Summary
1 package Bio::Installer::TCoffee;
2 1 $Bio::Installer::TCoffee::VERSION = '1.7.2';
3 1 ▶use utf8;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 1 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 1 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 1 ▶use vars qw(@ISA %DEFAULTS);
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 1 ▶use Bio::Root::Root;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 1 ▶use Bio::Installer::Generic;
Subroutine BEGIN: called CC=1 SCAR=0.0
11  
12 1 @ISA = qw(Bio::Installer::Generic );
13  
14 # ABSTRACT: DESCRIPTION of Object
15 # AUTHOR: Albert Vilella <avilella@gmail.com>
16 # OWNER: Albert Vilella <avilella@gmail.com>
17 # LICENSE: Perl_5
18  
19  
20 BEGIN {
21 1 ▶ %DEFAULTS = ( 'ORIGIN_DOWNLOAD_DIR' => 'http://www.tcoffee.org/Packages/',
Subroutine BEGIN: called CC=1 SCAR=0.0
22 'BIN_FOLDER' => 'bin',
23 'DESTINATION_DOWNLOAD_DIR' => '/tmp',
24 'DESTINATION_INSTALL_DIR' => "$ENV{'HOME'}",
25 # 'PACKAGE_NAME' => 'T-COFFEE_distribution_Version_4.45.tar.gz',
26 'PACKAGE_NAME' => 'T-COFFEE_distribution_Version_5.37.tar.gz',
27 # 'DIRECTORY_NAME' => 'T-COFFEE_distribution_Version_4.45',
28 'DIRECTORY_NAME' => 'T-COFFEE_distribution_Version_5.37',
29 'ENV_NAME' => 'TCOFFEEDIR',
30 );
31 }
32  
33  
34  
35 sub get_default {
36 0 ▶ my $self = shift;
Subroutine get_default: not called CC=1 SCAR=6.9
Pod documented
37 0 my $param = shift;
38 0 return $DEFAULTS{$param};
39 }
40  
41  
42  
43 sub install{
44 0 ▶ my ($self,@args) = @_;
Subroutine install: not called CC=1 SCAR=6.9
Pod documented
45 0 my $dir;
46 0 $self->_decompress;
47 0 $self->_execute_tcoffee_install_script;
48 0 $dir = $self->destination_install_dir;
49 0 $self->_remember_env;
50 }
51  
52  
53  
54 sub _execute_tcoffee_install_script{
55 0 ▶ my ($self,@args) = @_;
Subroutine _execute_tcoffee_install_script: not called CC=3 SCAR=24.8
56 0 my $call;
57  
58 0 my $destination = $self->destination_install_dir;
59 0 $destination =~ s|/$||;
60 0 $destination .= "/" . $self->directory_name;
61  
62 0 ▶ chdir $destination or die "Cant cd to $destination $!\n";
Branch: 1 branch
BranchTrueFalseTotal
chdir $destination or die "Cant cd to $destination $!\n" 0 0 0
63 0 print "\n\nCompiling now... (this might take a while)\n\n";
64 0 $call = "sh install";
65 0 ▶ system("$call") == 0 or die "Error when trying to run install script $?\n";
Branch: 1 branch
BranchTrueFalseTotal
system("$call") == 0 or die "Error when trying to run install script $?\n" 0 0 0
66  
67  
68 }
69  
70  
71 1 1;
72  
73 __END__
« Tools/Run/Alignment/TCoffee.pm ↑ Summary