NAME

Perlbug::Database - Bug support functions for Perlbug

DESCRIPTION

Access to the database for Perlbug

SYNOPSIS

my $o_db = Perlbug::Database->new(@args);

my $sth  = $o_db->query('show tables');

my @tables = $sth->fetchrow_array; # yek (should move get_list|data() from Base to here)

print "tables: @tables\n";

METHODS

new

Get a new db object

my $o_db = Perlbug::Database->new(@args);
quote

Quote the given string/s to 'sql\'s'

my $quoted = $o_db->quote($sql); 
comp

Return the appropriate comparison operator: LIKE or =

my $comp = $o_db->comp($str); 
dbh

Returns database handle for queries

my $o_dbh = $o_db->dbh;
DBConnect

DBConnect() checks to see if there is an open connection to the Savant database, opens one if there is not, and returns a global database handle. This eliminates opening and closing database handles during a session. undef is returned

query

Return sth from given query

my $sth = $o_db->query($sql);
case_sensitive

Return given args(column, string) as case sensitive match

my $sql = $o_db->case_sensitive('format', 'H');

AUTHOR

Richard Foley perlbug@rfi.net Oct 1999 2000 2001

From original work by Chris Masto chrism@netmonger.net