in reply to use Mysql; vs. use DBI;

From what it looks like, they are compatible. However, in the future, make sure to use DBD::mysql and not Mysql anymore. Eventually, it will be completely deprecated, and it Mysql.pm is therefore not a good idea to use it anymore.

* Slightly clarified one part.
~Thomas~ I believe that the source code to life is written in Perl :-)

Replies are listed 'Best First'.
Re^2: use Mysql; vs. use DBI;
by tobyink (Canon) on May 20, 2012 at 10:47 UTC

    Programming in Perl, and then not using DBI for your database stuff, is like buying a sports car and getting a horse to pull it along.

    perl -E'sub Monkey::do{say$_,for@_,do{($monkey=[caller(0)]->[3])=~s{::}{ }and$monkey}}"Monkey say"->Monkey::do'
Re^2: use Mysql; vs. use DBI;
by Mr. Muskrat (Canon) on May 21, 2012 at 18:39 UTC

    Exactly where in the docs for DBD::mysql did you read that you should use DBD::mysql? Everytime I've read it, it told me to use DBI.

      It was implied that you actually use DBI. Unless you want to add DBD::mysql as well, if you really want to.
      But you're missing the point of my post. The OP was asking about whether Mysql.pm or DBI.pm is better. I said that DBD::mysql was the better option, and anyone who has just skimmed the DBI documentation knows that the drivers reside in the DBD::* modules.

      ~Thomas~
      I believe that the source code to life is written in Perl :-)