Skip Menu |
 
rt.cpan.org will be shut down on March 1st, 2021.

This queue is for tickets about the Catalyst-Model-CDBI CPAN distribution.

Report information
The Basics
Id: 18197
Status: resolved
Priority: 0/
Queue: Catalyst-Model-CDBI

People
Owner: Nobody in particular
Requestors: DIEGOK [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.11
Fixed in: (no value)

Attachments


Subject: Can't find method set_sql trying to create a model from mysql
Download (untitled) / with headers
text/plain 870b
I'm getting the following error trying to create the model from a mysql backend Show quoted text
> script/admin_create.pl model CDBI CDBI dbi:mysql:database user pass
Couldn't require loader class "Class::DBI::Loader::mysql", "Can't locate object method "set_sql" via package "Class::DBI::mysql" at /usr/local/lib/perl5/site_perl/5.8.8/Class/DBI/mysql.pm line 58. Compilation failed in require at /usr/local/lib/perl5/site_perl/5.8.8/Class/DBI/Loader/mysql.pm line 8. Compilation failed in require at (eval 17) line 2. BEGIN failed--compilation aborted at (eval 17) line 2. " at /usr/local/lib/perl5/site_perl/5.8.8/Class/DBI/Loader.pm line 81. I found that the problem is it doesn't use Class::DBI before call his method "set_sql". I fixed it adding "use Class::DBI" sooner into Catalyst::Helper::Model::CDBI. Please contact me if you need some extra test. I'll be glad to help.
Download (untitled) / with headers
text/plain 1.2k
Hi Diego. Not quite sure what you are talking about here. Catalyst::Helper::Model::CDBI uses Class::DBI::Loader, and there is no set_sql in the helper at all. Maybe you really want to submit a bug on Class::DBI::Loader? If that is the case, please reply here so I can get this ticket closed, if not, please describe your problem closer. Marcus On Thu Mar 16 07:57:15 2006, DIEGOK wrote: Show quoted text
> I'm getting the following error trying to create the model from a mysql > backend >
> > script/admin_create.pl model CDBI CDBI dbi:mysql:database user pass
> > Couldn't require loader class "Class::DBI::Loader::mysql", "Can't locate > object method "set_sql" via package "Class::DBI::mysql" at > /usr/local/lib/perl5/site_perl/5.8.8/Class/DBI/mysql.pm line 58. > Compilation failed in require at > /usr/local/lib/perl5/site_perl/5.8.8/Class/DBI/Loader/mysql.pm line 8. > Compilation failed in require at (eval 17) line 2. > BEGIN failed--compilation aborted at (eval 17) line 2. > " at /usr/local/lib/perl5/site_perl/5.8.8/Class/DBI/Loader.pm line 81. > > I found that the problem is it doesn't use Class::DBI before call his > method "set_sql". > > I fixed it adding "use Class::DBI" sooner into > Catalyst::Helper::Model::CDBI. > > Please contact me if you need some extra test. I'll be glad to help. >
From: matthias [...] volltext.net
Download (untitled) / with headers
text/plain 2.1k
On Sun Apr 02 07:19:06 2006, MRAMBERG wrote: Show quoted text
> Hi Diego. Not quite sure what you are talking about here. > Catalyst::Helper::Model::CDBI uses > Class::DBI::Loader, and there is no set_sql in the helper at all. > Maybe you really want to > submit a bug on Class::DBI::Loader? If that is the case, please reply > here so I can get this > ticket closed, if not, please describe your problem closer.
hello, i had same problem with debian sarge, perl 5.8.4 and Catalyst::Helper::Model::CDBI version; attached patch made it go away --------->8---------------------------------------------------------- kaelte:app$ ./script/app_create.pl model UserData CDBI dbi:mysql:db user pass [...] Couldn't require loader class "Class::DBI::Loader::mysql", "Can't locate object method "set_sql" via package "Class::DBI::mysql" at /usr/local/share/perl/5.8.4/Class/DBI/mysql.pm line 58. Compilation failed in require at /usr/local/share/perl/5.8.4/Class/DBI/Loader/mysql.pm line 8. Compilation failed in require at (eval 13) line 2. BEGIN failed--compilation aborted at (eval 13) line 2. " at /usr/local/share/perl/5.8.4/Class/DBI/Loader.pm line 81. kaelte:app$ --------->8---------------------------------------------------------- Show quoted text
> On Thu Mar 16 07:57:15 2006, DIEGOK wrote:
> > I'm getting the following error trying to create the model from a
> mysql
> > backend > >
> > > script/admin_create.pl model CDBI CDBI dbi:mysql:database user
> pass
> > > > Couldn't require loader class "Class::DBI::Loader::mysql", "Can't
> locate
> > object method "set_sql" via package "Class::DBI::mysql" at > > /usr/local/lib/perl5/site_perl/5.8.8/Class/DBI/mysql.pm line 58. > > Compilation failed in require at > > /usr/local/lib/perl5/site_perl/5.8.8/Class/DBI/Loader/mysql.pm line
> 8.
> > Compilation failed in require at (eval 17) line 2. > > BEGIN failed--compilation aborted at (eval 17) line 2. > > " at /usr/local/lib/perl5/site_perl/5.8.8/Class/DBI/Loader.pm line
> 81.
> > > > I found that the problem is it doesn't use Class::DBI before call
> his
> > method "set_sql". > > > > I fixed it adding "use Class::DBI" sooner into > > Catalyst::Helper::Model::CDBI. > > > > Please contact me if you need some extra test. I'll be glad to help. > >
> >
Download C:H:M:CDBI.patch
text/x-diff 250b
--- Catalyst/Helper/Model/CDBI.pm.orig 2006-06-02 13:53:59.000000000 +0200 +++ Catalyst/Helper/Model/CDBI.pm 2006-06-02 13:46:26.000000000 +0200 @@ -2,6 +2,7 @@ use strict; use Class::DBI::Loader; +use Class::DBI; use File::Spec; =head1 NAME
From: matthias [...] volltext.net
Download (untitled) / with headers
text/plain 190b
On Fri Jun 02 08:05:04 2006, guest wrote: Show quoted text
> i had same problem with debian sarge, perl 5.8.4 and > Catalyst::Helper::Model::CDBI version; [-_-]
yes version is actually 0.11 cheers matthias
Fixed in the latest version, which also however adds a deprecation notice.


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.