On Sunday, July 1, 2001, at 03:53 AM, Nelson Goforth wrote:
> I want to install the DBI.pm module but am uncertain how to proceed.
>
> I've read instructions at CPAN and elsewhere, but still seem to be
> missing something.
>
> When I download a module and uncompress it, where do I put the .tar
> file before unpacking it and running 'make' etc.? Is there a
> particular directory that perl modules are in? I know that they CAN
> be found in System/Library/Perl - but that's outside the normal Unix
> directory structure isn't it? Moreover I can't copy the file (via drag
> and drop) to that directory.
Drag-and-drop must be the worst way of doing this as there's quite
a bit going on when installing it the normal way, which is:
In a terminal window, unpack the distribution in any directory,
then run make:
tar xzvf DBI-x.xx.tar.gz
make
make test
sudo make install
In the last step, you have to supply your administrator password.
If you have root enabled, you can also become root (su -) and use
the 'cpan' program to enter the CPAN shell. You'll have to answer
a few straight-forward questions first, but then you can simply
type
cpan> install DBI
to fetch it from your local CPAN mirror and install it, i.e. you
don't even have to download the tarball manually.
Also note that DBI is the basic framework; you still have to
install the database driver appropriate for your database, e.g.
DBD::Pg for Postgres, or DBD::mysql for MySQL. If you're not sure
about the name, search at http://search.cpan.org or, in the CPAN
shell, type
cpan> i /DBD::/
to get information on DBD::* modules.
The paths on OS X are different from standard Unix paths, but the way
Perl is built on that platform accounts for that; if you follow the
above steps, everything will end up in the right places.
Be sure to read perlmodinstall:
$ perldoc perlmodinstall
Marcel
--
my int ($x, $y, $z, $n); $x**$n + $y**$n = $z**$n is insoluble if $n > 2;
I have discovered a truly remarkable proof which this signature is too
short to contain. (20 Aug 2001: Pierre de Fermat's 400th birthday)