Re: [Catalyst] How to access DBIC schema from class method?

2010-08-11 Thread seasprocket
Ah, okay, I get it. Thank you!! On Wed, Aug 11, 2010 at 1:06 AM, Moritz Onken on...@houseofdesign.dewrote: Hi, you need to move this in the resultset class: package MyApp::Schema::ResultSet::User; use base 'DBIx::Class::ResultSet'; ... sub create_user { my ($rs, $params) = @_;

[Catalyst] How to access DBIC schema from class method?

2010-08-10 Thread seasprocket
I'm confused about the right way to get a schema instance from within a class method. If I've already got a resultset or resultsource instance, it's easy. But from a class method within my model? Do I create a new connection every time I need one, ie. MyApp::Schema-connect()? To be specific: