Commit 78b7de4e authored by Leo Gordon's avatar Leo Gordon
Browse files

switch to module->new() notation everywhere, to simplify text searches

parent 857b008f
...@@ -460,7 +460,7 @@ sub _objs_from_sth { ...@@ -460,7 +460,7 @@ sub _objs_from_sth {
my @statsArray = (); my @statsArray = ();
while ($sth->fetch()) { while ($sth->fetch()) {
my $analStats = new Bio::EnsEMBL::Hive::AnalysisStats; my $analStats = Bio::EnsEMBL::Hive::AnalysisStats->new();
$analStats->analysis_id($column{'analysis_id'}); $analStats->analysis_id($column{'analysis_id'});
$analStats->status($column{'status'}); $analStats->status($column{'status'});
......
...@@ -312,7 +312,7 @@ sub run { ...@@ -312,7 +312,7 @@ sub run {
} }
} }
my $hive_dba = new Bio::EnsEMBL::Hive::DBSQL::DBAdaptor(%{$self->o('pipeline_db')}); my $hive_dba = Bio::EnsEMBL::Hive::DBSQL::DBAdaptor->new( %{$self->o('pipeline_db')} );
my $resource_class_adaptor = $hive_dba->get_ResourceClassAdaptor; my $resource_class_adaptor = $hive_dba->get_ResourceClassAdaptor;
unless($job_topup) { unless($job_topup) {
......
...@@ -1060,7 +1060,7 @@ sub _objs_from_sth { ...@@ -1060,7 +1060,7 @@ sub _objs_from_sth {
my @workers = (); my @workers = ();
while ($sth->fetch()) { while ($sth->fetch()) {
my $worker = new Bio::EnsEMBL::Hive::Worker; my $worker = Bio::EnsEMBL::Hive::Worker->new();
$worker->init; $worker->init;
$worker->dbID($column{'worker_id'}); $worker->dbID($column{'worker_id'});
......
...@@ -143,7 +143,7 @@ sub main { ...@@ -143,7 +143,7 @@ sub main {
} elsif ( $self->{'db_conf'}->{'-host'} } elsif ( $self->{'db_conf'}->{'-host'}
and $self->{'db_conf'}->{'-user'} and $self->{'db_conf'}->{'-user'}
and $self->{'db_conf'}->{'-dbname'}) { # connect to database specified and $self->{'db_conf'}->{'-dbname'}) { # connect to database specified
$self->{'dba'} = new Bio::EnsEMBL::Hive::DBSQL::DBAdaptor(%{$self->{'db_conf'}}); $self->{'dba'} = Bio::EnsEMBL::Hive::DBSQL::DBAdaptor->new( %{$self->{'db_conf'}} );
$self->{'url'} = $self->{'dba'}->dbc->url; $self->{'url'} = $self->{'dba'}->dbc->url;
} else { } else {
print "\nERROR : Connection parameters (reg_conf+reg_alias, url or dbhost+dbuser+dbname) need to be specified\n\n"; print "\nERROR : Connection parameters (reg_conf+reg_alias, url or dbhost+dbuser+dbname) need to be specified\n\n";
......
...@@ -84,7 +84,7 @@ if($url) { ...@@ -84,7 +84,7 @@ if($url) {
} }
# connect to database specified # connect to database specified
$DBA = new Bio::EnsEMBL::Hive::DBSQL::DBAdaptor(%{$self->{'db_conf'}}); $DBA = Bio::EnsEMBL::Hive::DBSQL::DBAdaptor->new( %{$self->{'db_conf'}} );
#$url = $DBA->url(); #$url = $DBA->url();
} }
......
...@@ -65,7 +65,7 @@ sub _process_options { ...@@ -65,7 +65,7 @@ sub _process_options {
elsif ( $self->{db_conf}->{'-host'} elsif ( $self->{db_conf}->{'-host'}
&& $self->{db_conf}->{'-user'} && $self->{db_conf}->{'-user'}
&& $self->{db_conf}->{'-dbname'}) { # connect to database specified && $self->{db_conf}->{'-dbname'}) { # connect to database specified
$self->{dba} = new Bio::EnsEMBL::Hive::DBSQL::DBAdaptor(%{$self->{db_conf}}); $self->{dba} = Bio::EnsEMBL::Hive::DBSQL::DBAdaptor->new( %{$self->{db_conf}} );
} }
else { else {
pod2usage({ pod2usage({
...@@ -204,7 +204,7 @@ $Author: lg4 $ ...@@ -204,7 +204,7 @@ $Author: lg4 $
=head1 VERSION =head1 VERSION
$Revision: 1.9 $ $Revision: 1.10 $
=head1 REQUIREMENTS =head1 REQUIREMENTS
......
...@@ -74,7 +74,7 @@ if($reg_alias) { ...@@ -74,7 +74,7 @@ if($reg_alias) {
} elsif($url) { } elsif($url) {
$DBA = Bio::EnsEMBL::Hive::URLFactory->fetch($url) or die "Unable to connect to '$url'\n"; $DBA = Bio::EnsEMBL::Hive::URLFactory->fetch($url) or die "Unable to connect to '$url'\n";
} elsif ($db_conf->{'-host'} and $db_conf->{'-user'} and $db_conf->{'-dbname'}) { } elsif ($db_conf->{'-host'} and $db_conf->{'-user'} and $db_conf->{'-dbname'}) {
$DBA = new Bio::EnsEMBL::Hive::DBSQL::DBAdaptor(%$db_conf); $DBA = Bio::EnsEMBL::Hive::DBSQL::DBAdaptor->new( %$db_conf );
} else { } else {
print "\nERROR : Connection parameters (reg_conf+reg_alias, url or dbhost+dbuser+dbname) need to be specified\n\n"; print "\nERROR : Connection parameters (reg_conf+reg_alias, url or dbhost+dbuser+dbname) need to be specified\n\n";
script_usage(1); script_usage(1);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment