[haiku-3rdparty-dev] Re: Perl DBI

  • From: Andrew Wood <andrew@xxxxxxxxxxxxxxxxxxxxx>
  • To: haiku-3rdparty-dev@xxxxxxxxxxxxx
  • Date: Mon, 12 May 2014 12:26:03 +0100

Ok thanks for your help. It appears that DBI has installed OK but DBD::mysql wont, complaining that it cant find mysql_config

On 12/05/2014 00:58, Sean Healy wrote:
On Sun, 11 May 2014 10:59:04 -0700, Andrew Wood <andrew@xxxxxxxxxxxxxxxxxxxxx> wrote:

Is it possible to use Perls DBI module with Haiku to connect to MySQL? Its not installed by default in Alpha 4 and not being a Perl expert Im struggling to find info on how to obtain/build it.

The standard way to install things in Perl is "cpan install <module>", which will download (and build if necessary) your module.

The module name in this case should be DBD::mysql. That should automatically install the prerequisites, and DBI should be a prerequisite, but if not, you can install DBI the same way.

Some caveats:

1) I've never actually used the cpan installer in Haiku. It's found in Perl's bin folder, which may or may not be added to the path when installing Perl. You may have to cd to that folder.

2) I'm not sure it will actually build - if Haiku's sockets are like BeOS's, they don't work like standard sockets, and I don't know whether 1) the MySQL codebase takes this into account, or 2) if it does, whether DBD::mysql uses it, or reinvents the wheel by using its own sockets.

3) There is apparently a DBD::mysqlPP (pp = Pure Perl) module, which should work if Perl's sockets work on Haiku in the first place. But it will be slower than the standard DBD::mysql, which is a compiled extension.

(I know Perl pretty well, and I've used it in Haiku, but strictly local - no sockets. I remember there were issues with Perl sockets on BeOS, and I don't remember whether that's been fixed in Haiku)

Thanks
Andrew



Other related posts: