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

In reply to Re^2: Use Moose in Controller and Model by sman
in thread Use Moose in Controller and Model by sman

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.