[Catalyst] Problem with create.pl model CDBI, set_sql not found
Ralph Meek
ralph at usrmedia.com
Wed Mar 8 15:13:33 CET 2006
Hi,
I can't seem to fix this problem. I created a fresh Catalyst application with:
"catalyst.pl TestApp", all the files are created. Then I create a CDBI model
with the following command / results:
ralph at toronto:/data/develop/TestApp$ script/testapp_create.pl model CDBI CDBI
dbi:mysql:database user pass
exists "/usr/local/data/develop/TestApp/script/../lib/TestApp/Model"
exists "/usr/local/data/develop/TestApp/script/../t"
created "/usr/local/data/develop/TestApp/script/../lib/TestApp/Model/CDBI.pm"
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.8/Class/DBI/mysql.pm line 58, <DATA> line 1.
Compilation failed in require
at /usr/local/share/perl/5.8.8/Class/DBI/Loader/mysql.pm line 8, <DATA> line
1.
Compilation failed in require at (eval 15) line 2, <DATA> line 1.
BEGIN failed--compilation aborted at (eval 15) line 2, <DATA> line 1.
" at /usr/local/share/perl/5.8.8/Class/DBI/Loader.pm line 81, <DATA> line 1.
It looks like some module is missing, however I'm sure the following modules
exist and are up-to-date:
ralph at toronto:/data/develop/TestApp# cpan -i Catalyst
Class::DBI::Loader::mysql Class::DBI::mysql Class::DBI Class::DBI::Loader
CPAN: File::HomeDir loaded ok
CPAN: Storable loaded ok
Going to read /root/.cpan/Metadata
Database was generated on Tue, 07 Mar 2006 12:40:58 GMT
Catalyst is up to date (5.65).
Class::DBI::Loader::mysql is up to date (0.30).
Class::DBI::mysql is up to date (1.00).
Class::DBI is up to date (v3.0.14).
Class::DBI::Loader is up to date (0.32).
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?
Thanks in advance!
Ralph.
More information about the Catalyst
mailing list