PDA

View Full Version : CPAN and 10.5 Apple X Serve


MacDillon
02-15-2008, 03:54 PM
I recently relocated some Linux Perl scripts to a new Apple X Serve (advanced) 10.5.

When executing the scripts they errors with:

Can't locate Mysql.pm in @INC (@INC contains: /System/Library/Perl/5.8.8/darwin-thread-multi-2level /System/Library/Perl/5.8.8 /Library/Perl/5.8.8/darwin-thread-multi-2level /Library/Perl/5.8.8 /Library/Perl /Network/Library/Perl/5.8.8/darwin-thread-multi-2level /Network/Library/Perl/5.8.8 /Network/Library/Perl /System/Library/Perl/Extras/5.8.8/darwin-thread-multi-2level /System/Library/Perl/Extras/5.8.8 /Library/Perl/5.8.6 /Library/Perl/5.8.1 .)


1). I assume I need to install modules from CPAN (DBI & DBD-mysql). because I can not locate the Mysql.pm module on this server.

How do I install/update perl modules on OS X (Leopard)? Can someone point me to some instructions for updating via CPAN and 10.5 Apple X Serve?


2). Shouldn't this be common? This makes me wonder if there are other ways for calling Mysql from within Perl that use newer methods/modules. I may be able to figure such out if I had some example Perl script calling Mysql specifically for OS X platform. Anyone know of such Perl/Mysql examples for OS X?

I'm using:
#!/usr/bin/perl

use strict;
use CGI qw/:all/;
use Mysql;

Any leads are appreciated.