[Catalyst] Catalyst modperl - child process segmentation fault

Marcello Romani mromani at ottotecnica.com
Thu Jan 8 10:57:57 GMT 2009

Terence Monteiro ha scritto:


> not happen? I am initializing the database connection in a Controller. Is
> there any problem in this, though it may not be the best design. Will
> putting the database initialization code in the Model help? I have included

afaict, you should let dbic / cat-model handle the connection to the 
database. I usually use something like this: a


package which inherits from e.g.


and calls

	schema_class => 'MyApp::Schema',
	connect_info => [ $dsn, $user, $pass, $options ],

This way I don't explicitly connect at startup, but let the framework 
perform the actual connection when needed (i.e. at first db access, with 
something like $c->model('Main')->resultset('Users')->find($id))



Marcello Romani
Responsabile IT
Ottotecnica s.r.l.

More information about the Catalyst mailing list