DBD-mysql-SimpleMySQL
view release on metacpan or search on metacpan
SimpleMySQL.pm view on Meta::CPAN
}
close $fh if (-f $DEBUG_FILE and -w $DEBUG_FILE);
}
}
sub dbconnect ($) {
my $dbinfo = shift;
${$dbinfo}{host} = 'localhost' unless(defined(${$dbinfo}{host}));
${$dbinfo}{user} = scalar(getpwuid($<)) unless(defined(${$dbinfo}{user}));
${$dbinfo}{pass} = '' unless(defined(${$dbinfo}{pass}));
${$dbinfo}{port} = '3306' unless(defined(${$dbinfo}{port}));
${$dbinfo}{RaiseError} = 0 unless(defined(${$dbinfo}{RaiseError}));
${$dbinfo}{AutoCommit} = 1 unless(defined(${$dbinfo}{AutoCommit}));
unless(defined(${$dbinfo}{dsh})) {
${$dbinfo}{dsh} .= "DBI";
${$dbinfo}{dsh} .= ":mysql";
${$dbinfo}{dsh} .= ":host=${$dbinfo}{host}";
${$dbinfo}{dsh} .= ":datasbase=${$dbinfo}{database}" unless(defined(${$dbinfo}{database}));;
( run in 0.236 second using v1.01-cache-2.11-cpan-8d75d55dd25 )