[Bio] / MGRAST / JobMetaDBHandle.pm Repository:
ViewVC logotype

View of /MGRAST/JobMetaDBHandle.pm

Parent Directory Parent Directory | Revision Log Revision Log

Revision 1.1 - (download) (as text) (annotate)
Mon Oct 12 11:45:55 2009 UTC (10 years, 7 months ago) by paczian
Branch: MAIN
CVS Tags: mgrast_dev_08112011, mgrast_dev_08022011, mgrast_dev_03052011, mobedac_release_05302012, mgrast_dev_05262011, mgrast_dev_04082011, mgrast_version_3_2, mgrast_dev_12152011, mgrast_dev_06072011, mgrast_dev_10262011, mgrast_dev_02212011, mgrast_release_3_0, mgrast_dev_03252011, mgrast_release_3_0_4, mgrast_release_3_0_2, mgrast_release_3_0_3, mgrast_release_3_0_1, mgrast_dev_03312011, mgrast_release_3_1_2, mgrast_release_3_1_1, mgrast_release_3_1_0, mgrast_dev_04132011, mgrast_dev_04012011, myrast_33, mgrast_dev_04052011, mgrast_dev_02222011, HEAD
new style

package JobMetaDBHandle;

# JobMetaDBHandle - connector to the Job Metainformation database

use strict;
use warnings;

use FIG_Config;
use DBMaster;


=head1 NAME

JobMetaDBHandle - connector to the Job Metainformation database


This module returns an array of the DBMaster object connected to the JobMeta database
and a possible error message. In case of an error, the dbmaster will be undef. Otherwise
the error will be undef.

=head1 METHODS

=over 4

=item * B<new> ()

Creates a new instance of the JobMetaDBHandle object.


sub new {

    # get the connection data from FIG_Config.pm
    my $dbmaster;
    eval {
      $dbmaster = DBMaster->new(-database => $FIG_Config::mgrast_metadata_db || "MGRASTMetadata",
				-host     => $FIG_Config::mgrast_metadata_host || "localhost",
				-user     => $FIG_Config::mgrast_metadata_user || "root",
				-password => $FIG_Config::mgrast_metadata_password || "");

    if ($@) {
      return (undef, $@);

    return ($dbmaster, undef);


MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3