On Tue, 17 Jul 2001, Chabowski wrote:

> I'm testing mason for the first time on our servers, and although mason
> itself is working, I can't seem to get it to recognize DBI.  I have
> included "use Apache::DBI;" in my handler.pl file.  I have to say I'm a
> novice with DBI, so I'm probably doing something stupid.  In my mason
> component file, I make a connect call in the following way:    $dbh =
> DBI->connect ($dsn, $user_name, $password) || die qq{DBI error from
> connect: "$DBI::errstr"};
>
>
> I have declared $dsn as: my ($dsn) = "DBI:mysql:test_db"; and declared
> $user_name and $password in a similar fashion.  I always get the following
> error message:
> Can't locate object method "connect" via package "DBI" at
> /home/www/mason_data/linguafranca/obj/mason/db_comp.mhtml line 24, <FH>
> chunk 1.
>
> Any clues as to what to try next would be greatly appreciated.  Thanks for
> taking the time to look this over.

use DBI


Mason is no different than regular Perl.  You still have to load the
modules you're using.  Apache::DBI does not load DBI (though maybe it
should, come to think of it).


-dave

/*==================
www.urth.org
We await the New Sun
==================*/

Reply via email to