#!/bin/sh
#-*-Perl-*-

exec perl -x $0 "$@"

#!/perl

use DBI;
use strict;

my @dbs = DBI->data_sources("mysql");

my $DBHandle = DBI->connect("$dbs[0]","root","");
$DBHandle->func("createdb","JUD","admin");
$DBHandle->disconnect();

my $DBHandle = DBI->connect("DBI:mysql:database=JUD","root","");
my $sth = $DBHandle->prepare("CREATE TABLE jud (jid VARCHAR(100), name VARCHAR(100) INDEX, first VARCHAR(50) INDEX, last VARCHAR(50) INDEX, nick VARCHAR(50) INDEX, email VARCHAR(50) INDEX);");
$sth->execute;
$DBHandle->disconnect();

