On Wed, Apr 11, 2001 at 01:39:58PM -0300, Roberto Slepetys Ferreira wrote:
> I changed the use part to use DBD:mysql - that works fine in perl, but
> continues to give-me an error with perlcc as below:
>
> Can't locate object method "connect" via package "DBI" (perhaps you forgot
> to load "DBI"?) at teste.pl line 9.
Of course, because you didn't load the DBI module.
> The script is writen below:
>
> #!/usr/bin/perl
>
> use CGI qw(:standard);
> use DBD::mysql;
Take out the use DBD::mysql line, and replace it with:
use DBI;
The DBI module will handle loading the appropriate DBD module, based on the
arguments to DBI->connect().
Ronald