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 {
my @statsArray = ();
while ($sth->fetch()) {
my $analStats = new Bio::EnsEMBL::Hive::AnalysisStats;
my $analStats = Bio::EnsEMBL::Hive::AnalysisStats->new();
$analStats->analysis_id($column{'analysis_id'});
$analStats->status($column{'status'});
......
......@@ -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;
unless($job_topup) {
......
......@@ -1060,7 +1060,7 @@ sub _objs_from_sth {
my @workers = ();
while ($sth->fetch()) {
my $worker = new Bio::EnsEMBL::Hive::Worker;
my $worker = Bio::EnsEMBL::Hive::Worker->new();
$worker->init;
$worker->dbID($column{'worker_id'});
......
......@@ -143,7 +143,7 @@ sub main {
} elsif ( $self->{'db_conf'}->{'-host'}
and $self->{'db_conf'}->{'-user'}
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;
} else {
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) {
}
# 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();
}
......
......@@ -65,7 +65,7 @@ sub _process_options {
elsif ( $self->{db_conf}->{'-host'}
&& $self->{db_conf}->{'-user'}
&& $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 {
pod2usage({
......@@ -204,7 +204,7 @@ $Author: lg4 $
=head1 VERSION
$Revision: 1.9 $
$Revision: 1.10 $
=head1 REQUIREMENTS
......
......@@ -74,7 +74,7 @@ if($reg_alias) {
} elsif($url) {
$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'}) {
$DBA = new Bio::EnsEMBL::Hive::DBSQL::DBAdaptor(%$db_conf);
$DBA = Bio::EnsEMBL::Hive::DBSQL::DBAdaptor->new( %$db_conf );
} else {
print "\nERROR : Connection parameters (reg_conf+reg_alias, url or dbhost+dbuser+dbname) need to be specified\n\n";
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