in reply to Use Moose in Controller and Model
Well, without error messages I have no idea what your real problem is. I do have some suspicions though, which I have detailed below. Next time you post something like this, include the errors you are getting (no matter how large) it will go a long way in helping us help you solve your problem.
You have already been told that this approach is not advised, you should be using DBIx::Class as it was intended.package MyApp::Schema::Result::Item; use Moose; extends 'DBIx::Class::Core';
This doesn't make much sense here because you are using Moose then using base. I think what you really want here is:package MyApp::Model::MD; use Moose; use base 'Catalyst::Model::DBIC::Schema';
This is exactly the code I am using in my catalyst apps right now. If this still doesn't work, then I suspect it is because of how you are (ab)using DBIx::Class in MyApp::Schema::Result::Item and you should change that.package MyApp::Model::MD; use Moose; BEGIN { extends 'Catalyst::Model::DBIC::Schema' };
Again you have this mix of Moose and base, what you really want here is:package MyApp::Controller::Item; use Moose; use base qw/Catalyst::Controller::FormBuilder/;
package MyApp::Controller::Item; use Moose; BEGIN { extends qw/Catalyst::Controller::FormBuilder/ };
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Use Moose in Controller and Model
by sman (Beadle) on Jan 25, 2010 at 19:32 UTC |