I have a set of classes I use with Maypole::Model::CDBI::Plain.  The
distinctive thing I do is that I work very hard at using a single
database connection for every mod_perl process so I have all tables
named in the CDBI classes as physemp2.affiliates, physemp2.employee
and so on, which forces me to configure like this:

Physemp2::DB->config->model('Maypole::Model::CDBI::Plain');
Physemp2::DB->setup(
[qw/ Physemp2::DB::Account          Physemp2::DB::AdminAuthSession
     Physemp2::DB::AdResponse       Physemp2::DB::AdSearch
     Physemp2::DB::AdSession        Physemp2::DB::AdUserAreaChoice
     Physemp2::DB::AdUserCv         Physemp2::DB::AdUser
     Physemp2::DB::AdUserSpecialty  Physemp2::DB::AdUsersToNames
     Physemp2::DB::AdView           Physemp2::DB::Affiliate
     Physemp2::DB::AreaChoice       Physemp2::DB::AuthSession
     Physemp2::DB::Bot              Physemp2::DB::Bounce
     Physemp2::DB::CodeState        Physemp2::DB::ContactStatus
     Physemp2::DB::Country          Physemp2::DB::EmailedName
     Physemp2::DB::EmailToAccount   Physemp2::DB::Employee
     Physemp2::DB::Field            Physemp2::DB::InhousePost
     Physemp2::DB::Job              Physemp2::DB::NameAreaChoice
     Physemp2::DB::NameCv           Physemp2::DB::NameNotes
     Physemp2::DB::Name             Physemp2::DB::NameSpecialty
     Physemp2::DB::NamesToNames     Physemp2::DB::OutsidePost
     Physemp2::DB::Page             Physemp2::DB::PositionType
     Physemp2::DB::PurchaseItem     Physemp2::DB::Purchase
     Physemp2::DB::Referral         Physemp2::DB::Specialty
     Physemp2::DB::SpecialtySynonym /]);

Physemp2::DB->config->{uri_base}      =
  'http://ceverett.physemp.com/admin/site/';
Physemp2::DB->config->{template_root}    =
  '/home/ceverett/apache/applications/common/templates/maypole';
Physemp2::DB->config->{rows_per_page}    = 20;

## note use of schema name for display_tables
Physemp2::DB->config->{display_tables}   =
 [ qw/ physemp2.employee physemp2.position_type
       physemp2.specialty physemp2.specialty_synonym / ];

Physemp2::DB->config->{application_name} = "Physemp Site Admin";

Anyways, when I set a browser to /admin/site/physemp2.employee/list
or try to list any other table, the server grinds for 45 seconds
(and I have a decently fast 64-bit box) and then gives me a 404.

I have pinpointed where it spends all that time, a line in
Maypole::handler_guts(),

eval { $status = $r->view_object->process($r) };

WTH am I doing wrong?
I've attached my CDBI base class and the Physemp2::Model::Employee
class as well as my code above.

Christopher

Attachment: Base.pm
Description: Perl program

Attachment: Employee.pm
Description: Perl program

Reply via email to