connection() dispatch

[prev] [thread] [next] [Date index for 2005/07/06]

From: webmaster
Subject: connection() dispatch
Date: 14:50 on 06 Jul 2005
Regarding this error:

Can't locate object method "connection" via package "Unicorn::DBI" at ...

This is my first CDBI script and is intended as a proof-of-concept sanity check. I borrowed the example code from the intro of the Class::DBI man page and ran it as:

package Unicorn::DBI;
use base 'Class::DBI';

Unicorn::DBI->connection(db_name, user, pw);

<snip>

My guess is that I've failed to properly specify a driver for MySQL. I'm confused as to how DBI.pm and the driver are supposed to link with CDBI. Just 'using' DBD::mysql made no difference. Must I set up the connection via DBI and DBD first? And if so, how is connection() dispatched?

Thanks for your help

Bogart Salzberg
InkFist.Com

connection() dispatch
webmaster 14:50 on 06 Jul 2005

Re: connection() dispatch
Tony Bowden 14:54 on 06 Jul 2005

Re: connection() dispatch
Matt S Trout 17:57 on 06 Jul 2005

Re: connection() dispatch
Bogart Salzberg 12:37 on 07 Jul 2005

Generated at 16:37 on 28 Jul 2005 by mariachi v0.52