PublicMySQLServer.pm
Go to the documentation of this file.
00001 
00002 =head1 LICENSE
00003 
00004 Copyright [2009-2014] EMBL-European Bioinformatics Institute
00005 
00006 Licensed under the Apache License, Version 2.0 (the "License");
00007 you may not use this file except in compliance with the License.
00008 You may obtain a copy of the License at
00009 
00010      http://www.apache.org/licenses/LICENSE-2.0
00011 
00012 Unless required by applicable law or agreed to in writing, software
00013 distributed under the License is distributed on an "AS IS" BASIS,
00014 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00015 See the License for the specific language governing permissions and
00016 limitations under the License.
00017 
00018 =cut
00019 
00020 =head1 CONTACT
00021 
00022   Please email comments or questions to the public Ensembl
00023   developers list at <dev@ensembl.org>.
00024 
00025   Questions may also be sent to the Ensembl help desk at
00026   <helpdesk@ensembl.org>.
00027 
00028 =cut
00029 
00030 =head1 NAME
00031 
00032 Bio::EnsEMBL::Utils::PublicMySQLServer
00033 
00034 =head1 SYNOPSIS
00035 
00036   use Bio::EnsEMBL::Utils::PublicMySQLServer;
00037 
00038 =head1 DESCRIPTION
00039 
00040 Provides access to arguments needed to access EG and Ensembl public MySQL servers
00041 
00042 =cut
00043 
00044 package Bio::EnsEMBL::Utils::PublicMySQLServer;
00045 
00046 use strict;
00047 use warnings;
00048 
00049 use Bio::EnsEMBL::Utils::Exception qw(warning);
00050 
00051 use Exporter;
00052 
00053 use base qw( Exporter );
00054 
00055 our @EXPORT = qw(eg_host eg_port eg_user eg_pass eg_args e_host e_port e_user e_pass e_args);
00056 
00057 use constant PUBLIC_EG_HOST => 'mysql-eg-publicsql.ebi.ac.uk';
00058 use constant PUBLIC_EG_USER => 'anonymous';
00059 use constant PUBLIC_EG_PASS => '';
00060 use constant PUBLIC_EG_PORT => 4157;
00061 use constant PUBLIC_E_HOST => 'ensembldb.ensembl.org';
00062 use constant PUBLIC_E_USER => 'anonymous';
00063 use constant PUBLIC_E_PASS => '';
00064 use constant PUBLIC_E_PORT => 5306;
00065 
00066 
00067 sub eg_host {
00068   return PUBLIC_EG_HOST;
00069 }
00070 
00071 sub eg_port {
00072   return PUBLIC_EG_PORT;
00073 }
00074 
00075 sub eg_user {
00076   return PUBLIC_EG_USER;
00077 }
00078 
00079 sub eg_pass {
00080   return PUBLIC_EG_PASS;
00081 }
00082 
00083 sub eg_args {
00084   return {-USER => PUBLIC_EG_USER,
00085           -HOST => PUBLIC_EG_HOST,
00086           -PORT => PUBLIC_EG_PORT};
00087 }
00088 
00089 sub e_host {
00090   return PUBLIC_E_HOST;
00091 }
00092 
00093 sub e_port {
00094   return PUBLIC_E_PORT;
00095 }
00096 
00097 sub e_user {
00098   return PUBLIC_E_USER;
00099 }
00100 
00101 sub e_pass {
00102   return PUBLIC_E_PASS;
00103 }
00104 
00105 sub e_args {
00106   return {-USER => PUBLIC_E_USER,
00107           -HOST => PUBLIC_E_HOST,
00108           -PORT => PUBLIC_E_PORT};
00109 }
00110 
00111 1;
00112