-#!/usr/bin/env perl -w
+#!/usr/bin/env perl
# Copyright (C) 2007-2009 Martin A. Hansen.
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
+use warnings;
use strict;
use Maasha::Biopieces;
use Maasha::Common;
# >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-my ( $options, $in, $out, $record, %table_hash, $dbh, $table );
+my ( $options, $user, $password, $in, $out, $record, %table_hash, $dbh, $table );
+
+$user = Maasha::Biopieces::biopiecesrc( "MYSQL_USER" );
+$password = Maasha::Biopieces::biopiecesrc( "MYSQL_PASSWORD" );
$options = Maasha::Biopieces::parse_options(
[
- { long => 'database', short => 'd', type => 'string', mandatory => 'yes', default => undef, allowed => undef, disallowed => undef },
- { long => 'tables', short => 't', type => 'list', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
- { long => 'keys', short => 'k', type => 'list', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
- { long => 'user', short => 'u', type => 'string', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
- { long => 'password', short => 'p', type => 'string', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+ { long => 'database', short => 'd', type => 'string', mandatory => 'yes', default => undef, allowed => undef, disallowed => undef },
+ { long => 'tables', short => 't', type => 'list', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+ { long => 'keys', short => 'k', type => 'list', mandatory => 'no', default => undef, allowed => undef, disallowed => undef },
+ { long => 'user', short => 'u', type => 'string', mandatory => 'no', default => $user, allowed => undef, disallowed => undef },
+ { long => 'password', short => 'p', type => 'string', mandatory => 'no', default => $password, allowed => undef, disallowed => undef },
]
);