MySQL::Easy - Perl extension to handle various mundane DBI session related things specific to mysql.
Perl
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
t
.gitignore
Changes
Easy.pm
Easy.pod
MANIFEST
MANIFEST.SKIP
Makefile.PL
README

README

Just what is this and why did you write it?

Well, I wrote MySQL::Easy (bad name, I know) because I didn't like all the
work I had to do maintaining and working with the DBI methods to keep my
mysql connection alive.  I found I had to do the same simple lines of code
over and over and I didn't like it.  That is all.

Examples:

my $dbh = DBI->connect("DBI::mysql:testdb:host=something:port=something;opt;opt;opt");
my $dbo = new MySQL::Easy("testdb");

Easy reads your $ENV{HOME}/.my.cnf for unp when you don't specify the
username/pass directly.  Handy?!?!  Yes.

my $sth1 = $dbh->prepare("select something from something where something=something");
my $sth2 = $dbo->ready("select something from something where something=something");

$sth1 looks pretty much the same as $sth2... but $sth2 will check to see if
the connection is still there and if it isn't, will rebuild the connection
and re-prepare the sth automatically -- ie, no errors.

Other than these two little things, this package is probably not necessary and
sticking with vanilla DBI is probably the way to go.

- Paul