[Dbix-class] DBIx::Class and mod_perl

Rolf Schaufelberger rs at plusw.de
Wed Mar 22 17:47:54 CET 2006


Hi, 

I'm currently using Class::DBI in some larger web applications and "watching" 
this list. I've been playing around a bit with it (0.0499) and now have two 
questions:

What is the preferred way to have DBIx::Class to run with mod_perl ?
With CDBI I use the solution described here: 
http://wiki.class-dbi.com/wiki/Using_with_mod_perl

Question 2 is: I'm using Postgres and my database is spread over different 
schemas. So, i set the search_path in my Db_Main with values set by 
parameters (that are VirtualHost dependend ). Now I haven't found any way 
where I can place some code to execute directly after the connection. 
Since this code sets session parameters I need to do this only once after 
connecting and then cache my dbh in $r->pnotes (as described above). 

What would be the recommended way to do this in DBIX::Class ?

-- 
regards,
Rolf Schaufelberger



More information about the Dbix-class mailing list