Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

MySQL::Easy - Perl extension to handle various mundane DBI session related things specific to mysql.

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 t
Octocat-spinner-32 .gitignore
Octocat-spinner-32 Changes
Octocat-spinner-32 Easy.pm
Octocat-spinner-32 Easy.pod
Octocat-spinner-32 MANIFEST
Octocat-spinner-32 MANIFEST.SKIP
Octocat-spinner-32 Makefile.PL
Octocat-spinner-32 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
Something went wrong with that request. Please try again.