[Catalyst] Problem with create.pl model CDBI, set_sql not found

Matt S Trout dbix-class at trout.me.uk
Wed Mar 8 15:39:28 CET 2006


Ralph Meek wrote:
  > When I try to create a model based on DBIC, all files are created without
> error:
> 
> ralph at toronto:/data/develop/TestApp$ script/testapp_create.pl model DBIC DBIC 
> dbi:mysql:database user pass
> 
> 
> I did find out that the following command gives the same error:
> 
> ralph at toronto:/data/develop/TestApp$ perl -e "use Class::DBI::Loader::mysql;"
> Can't locate object method "set_sql" via package "Class::DBI::mysql" 
> at /usr/local/share/perl/5.8.8/Class/DBI/mysql.pm line 58.
> Compilation failed in require 
> at /usr/local/share/perl/5.8.8/Class/DBI/Loader/mysql.pm line 8.
> Compilation failed in require at -e line 1.
> BEGIN failed--compilation aborted at -e line 1.
> 
> 
> And the following command works fine:
> 
> ralph at toronto:/data/develop/TestApp$ perl -e "use Class::DBI; use 
> Class::DBI::Loader::mysql;"
> 
> 
> So this might be a clue to what the problem is....
> 
> I'm breaking my head over this, I don't know where to look anymore. Any 
> suggestions?

It's a dumbfuck error in the way CDBI::mysql is written, I suspect. I'd vote 
for "use this to prove to $management DBIC is a better option" but if not, how 
about 'perl -MClass::DBI script/myapp_create.pl ...'?

-- 
      Matt S Trout       Offering custom development, consultancy and support
   Technical Director    contracts for Catalyst, DBIx::Class and BAST. Contact
Shadowcat Systems Ltd.  mst (at) shadowcatsystems.co.uk for more information

+ Help us build a better perl ORM: http://dbix-class.shadowcatsystems.co.uk/ +



More information about the Catalyst mailing list