Click here to get back home

Problem with set_sql in Class::DBI::Loader::mysql

 HomeNewsGroups | Search | About
 comp.lang.perl.modules    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
Problem with set_sql in Class::DBI::Loader::mysql Eden Cardim 03-22-2006
Get Chitika Premium
Posted by Eden Cardim on March 22, 2006, 2:47 pm
Please log in for more thread options


Hello everyone,
I'm developing a system based on Maypole, which in turn is based on
Class::DBI::Loader. SQLite was being used for testing, until then
everything was fine. But when I switched over to mysql, its
corresponding Loader class complains about not having the set_sql
method available in Class::DBI::mysql, which it should since it
inherits from Class::DBI. The doc synopsis for
Class::DBI::Loader::mysql doesn't even compile, the output is:

Couldn't require loader class "Class::DBI::Loader::mysql", "Can't
locate object method "set_sql" via package "Class::DBI::mysql" at
/usr/lib/perl5/site_perl/5.8.6/Class/DBI/mysql.pm line 58.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.6/Class/DBI/Loader/mysql.pm line 8.
Compilation failed in require at (eval 1) line 2.
BEGIN failed--compilation aborted at (eval 1) line 2.
" at /usr/lib/perl5/site_perl/5.8.6/Class/DBI/Loader.pm line 81.

I've tried debugging the thing up to where it calls the set_sql method,
the @Class::DBI::mysql::ISA array is fine, but still the method won't
show up. I'm running a fedora 4 linux box, mysql 5.0 and perl 5.8.6. I
installed DBD::mysql from the fedora package repository. Who's doing it
wrong, me or the module?
Thanks in advance.


Posted by stephane.kattoor on March 25, 2006, 12:47 pm
Please log in for more thread options


Eden Cardim a =E9crit :

> Couldn't require loader class "Class::DBI::Loader::mysql", "Can't
> locate object method "set_sql" via package "Class::DBI::mysql" at
> /usr/lib/perl5/site_perl/5.8.6/Class/DBI/mysql.pm line 58.
> Compilation failed in require at
> /usr/lib/perl5/site_perl/5.8.6/Class/DBI/Loader/mysql.pm line 8.
> Compilation failed in require at (eval 1) line 2.
> BEGIN failed--compilation aborted at (eval 1) line 2.
> " at /usr/lib/perl5/site_perl/5.8.6/Class/DBI/Loader.pm line 81.

Very same problem here, trying to build an application with Catalyst
.=2E. Any perl guru with a good hint ?

St=E9phane


Posted by Eden Cardim on March 28, 2006, 7:41 am
Please log in for more thread options


stephane.kattoor@gmail.com wrote:
> Very same problem here, trying to build an application with Catalyst
> ... Any perl guru with a good hint ?

I figured it out. For some reason, the modules aren't loading in the
correct order, I didn't have time to delve deeper into the module code.
So I tried loading them manually and it ended up working. So, start
your code with this:

use Class::DBI::Loader;
use Class::DBI::mysql;
use Class::DBI::Loader::mysql;

and everything should go fine.


Similar ThreadsPosted
Class::DBI::Loader. knowing table names and columns November 29, 2005, 11:35 am
Problem with DBD-mysql November 20, 2004, 2:34 am
DBD::mysql problem November 24, 2004, 12:24 am
problem installing DBD-mysql January 10, 2005, 5:51 pm
DBI Mysql insert problem October 12, 2007, 6:18 pm
Mysql-DBD Perl module Installation Problem in HPUX June 30, 2005, 9:05 am
[RESOLVED] DBD::mysql unresolved symbol _intel_fast_memcpy & mysql-standard-5.0.22-linux-i686-icc-glibc23 August 29, 2006, 6:33 pm
MySQL 5.0 and Perl DBD-MySQL December 3, 2005, 1:10 am
Embedded mysql with DBD::mysql July 30, 2008, 10:15 am
DBD:mysql doesn't read mysql option file /etc/my.cnf file January 27, 2005, 11:19 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap