[Maypole] getting started woes..
michael
michael@petersfamily.org
Wed, 9 Jun 2004 15:46:47 -0500
I'm trying to get a simple Maypole app up and running and could use some help.
I get this in the error log...
Can't locate object method "set_db" via package "AHRPetition::Petition" at
/usr/lib/perl5/site_perl/5.8.3/Class/DBI/Loader/mysql.pm line 23
now I read the wiki and it said it could be cause I don't have the appropriate
Class::DBI::* modules installed.
but an ls -R on the lib directory for class DBI shows all of these...
ls -R Class/DBI
Class/DBI:
AbstractSearch.pm ColumnGrouper.pm FromCGI.pm Loader Pager.pm
Query.pm Relationship.pm
AsForm.pm Column.pm Iterator.pm Loader.pm Plugin
Relationship
Class/DBI/Loader:
Generic.pm mysql.pm Pg.pm Relationship.pm SQLite.pm
Class/DBI/Plugin:
RetrieveAll.pm Type.pm
Class/DBI/Relationship:
HasA.pm HasMany.pm MightHave.pm
so it appears to me that they are all there.
what might be the problem???
Here's my handler code...
[code]
package AHRPetition;
use Apache::Reload;
use base 'Apache::MVC';
AHRPetition->setup("dbi:mysql:AHR", 'root', 'whatever');
AHRPetition->config->{uri_base} = "http://localhost:8080/Petition/";
AHRPetition->config->{display_tables} = [qw[Petition User Sector Signature]];
AHRPetition::Petition->untaint_columns(
printable => [qw/title text/],
integer => [qw/User Sector active/],
);
use Class::DBI::Loader::Relationship;
AHRPetition->config->{loader}->relationship($_) for (
"a petition has a user",
"a petition has a sector",
"a user has a petition",
"a signature has a petition",
);
[/code]
thanks for looking at this.
Michael Peters