herkusberkus has asked for the wisdom of the Perl Monks concerning the following question:

1. Which package(s) are the coolest for MySQL work in ASP pages (Apache/mod_perl)? 2. If I develop using some special non-core package, won't I be stuck for hosts who have it installed?

20040608 Edit by jeffa: Changed title from 'MySQL'

  • Comment on Which modules are best for accessing MySQL

Replies are listed 'Best First'.
Re: Which modules are best for accessing MySQL
by jZed (Prior) on Jun 08, 2004 at 13:48 UTC
    The basics are DBI and DBD::mysql, neither of which is a core package. They, like all modules can be installed in private directories if there's no way to get them installed in a host's public directories.
      Thankyou. Top answer.
Re: Which modules are best for accessing MySQL
by cfreak (Chaplain) on Jun 08, 2004 at 13:51 UTC

    DBI is most commonly used for database access to MySQL and to others. If you're using mod_perl you'll probably want to check out Apache::DBI which will make your database connections persistent and thus faster.

    As for your 'non-standard' modules question, yes that can be a concern, however mod_perl itself isn't exactly standard, and everyone knows that DBI is the standard for database access in Perl. If you have a host that doesn't have it or won't install it, its likely they won't have mod_perl either.

      In fact a common gripe against mod_perl is that many hosting services won't offer it (or at least weren't back last I really paid attention to the mod_perl list) since there's not a really good way to compartmentalize different users' handlers and what not as there is with something like suexec and CGIs. If you're targeting a hosted environment and want persistence you might have better luck with something like FastCGI.

      (Not that mod_perl doesn't rule. I use it everywhere myself, but then again I also have always run the hardware myself as well.)

        I have found that VPS (Virtual Private Servers) are the way to go for mod_perl. We usually use Verio as our host, and their VPS plans have never done me wrong. I am sure other companies offer similar packages though.

        -stvn
        Exactly, which is unfortunate because it is very cool. Hopefully that situation will change as mod_perl2 gets out and stable. User control is much simpler with it from what I have read.
      A reply falls below the community's threshold of quality. You may see it by logging in.
      Thankyou. Another top answer.