Mysql::Simple

Mysql::Simple

am 17.09.2004 19:17:24 von Dan Bolser

I have made a perl module called Mysql::Simple which parses /etc/my.cfg
and ~.my.cfg to set up Mysql connection parameters. In case it dosn't find
a password it uses Term::ReadPassword to get the user to supply one.

It uses use Getopt::Long to read mysql style options (in passthrough
mode).

Finally it provides a simple interface, allowing you to code things like
the following (but not much else)...

#!/usr/bin/perl

use Mysql::Simple qw( doQuery );

$x = doQuery( ) or die "$DBI::errstr\n";

for (@$x){
print join("\t", @$_), "\n";
}

__END__

Quite simple eh?

I am looking for feedback, and perhaps a volunteer to help make this a
proper CPAN module.

The befifit of this module is never writing another connection string, and
not worrying about where to put your password.

It needs work on the range of mysql command line options supported and for
prepared queries (which it does support). The docs need some work.




--
MySQL Perl Mailing List
For list archives: http://lists.mysql.com/perl
To unsubscribe: http://lists.mysql.com/perl?unsub=gcdmp-msql-mysql-modules@m .gmane.org