in reply to Re: Use Moose in Controller and Model
in thread Use Moose in Controller and Model

Sorry for not attaching the error message. Here it comes. I got this one when I embed 'use Moose;' in the beginning of MyApp::Controller::User.pm
DBIx::Class::Core Couldn't load class (MyApp) because: Couldn't instantiate component "M +yApp::Controller::User", "Inconsistent hierarchy during C3 merge of c +lass 'MyApp::Controller::User': merging failed on parent 'Moose::Obje +ct' at /usr/lib/perl5/5.10.0/mro.pm line 23."Compilation failed in re +quire at /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-mult +i/Class/MOP.pm line 98. at /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/Clas +s/MOP.pm line 102 Class::MOP::__ANON__('Couldn\'t instantiate component "MyApp::Cont +roller::Use...') called at /usr/local/lib/perl5/site_perl/5.10.0/Try/ +Tiny.pm line 66 Try::Tiny::try('CODE(0xa1c796c)', 'CODE(0xa1c4554)') called at /us +r/local/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/Class/MOP. +pm line 107 Class::MOP::load_first_existing_class('MyApp') called at /usr/loca +l/lib/perl5/site_perl/5.10.0/i386-linux-thread-multi/Class/MOP.pm lin +e 118 Class::MOP::load_class('MyApp') called at /usr/local/lib/perl5/sit +e_perl/5.10.0/Catalyst/ScriptRole.pm line 61 Catalyst::ScriptRole::_run_application('Catalyst::Script::Server=H +ASH(0x9dce9bc)') called at /usr/local/lib/perl5/site_perl/5.10.0/Cata +lyst/Script/Server.pm line 144 Catalyst::Script::Server::__ANON__() called at /usr/local/lib/perl +5/site_perl/5.10.0/Catalyst/Restarter/Forking.pm line 20 Catalyst::Restarter::Forking::_fork_and_start('Catalyst::Restarter +::Forking=HASH(0xa0e0fc4)') called at /usr/local/lib/perl5/site_perl/ +5.10.0/Catalyst/Restarter.pm line 119 Catalyst::Restarter::_handle_events('Catalyst::Restarter::Forking= +HASH(0xa0e0fc4)', 'File::ChangeNotify::Event=HASH(0xa0f7eec)') called + at /usr/local/lib/perl5/site_perl/5.10.0/Catalyst/Restarter.pm line +96 Catalyst::Restarter::_restart_on_changes('Catalyst::Restarter::For +king=HASH(0xa0e0fc4)') called at /usr/local/lib/perl5/site_perl/5.10. +0/Catalyst/Restarter.pm line 84 Catalyst::Restarter::run_and_watch('Catalyst::Restarter::Forking=H +ASH(0xa0e0fc4)') called at /usr/local/lib/perl5/site_perl/5.10.0/Cata +lyst/Script/Server.pm line 178 Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0x9dc +e9bc)') called at /usr/local/lib/perl5/site_perl/5.10.0/i386-linux-th +read-multi/Class/MOP/Method/Wrapped.pm line 48 Class::MOP::Method::Wrapped::__ANON__('Catalyst::Script::Server=HA +SH(0x9dce9bc)') called at /usr/local/lib/perl5/site_perl/5.10.0/i386- +linux-thread-multi/Class/MOP/Method/Wrapped.pm line 89 Catalyst::Script::Server::run('Catalyst::Script::Server=HASH(0x9dc +e9bc)') called at /usr/local/lib/perl5/site_perl/5.10.0/Catalyst/Scri +ptRunner.pm line 20 Catalyst::ScriptRunner::run('Catalyst::ScriptRunner', 'MyApp', 'Se +rver') called at script/app_cinema_server.pl line 8

Replies are listed 'Best First'.
Re^3: Use Moose in Controller and Model
by Anonymous Monk on Jan 25, 2010 at 18:53 UTC