On Mon, Aug 9, 2010 at 12:24 PM, Tobias Kremer <[email protected]> wrote:
>>> Couldn't load class (MyApp) because:
>>> DBIx::Class::Row::throw_exception(): Can't locate object method
>>> "register_source" via package "MyApp::Schema" at
>>> xxx/MyApp/Schema/User.pm line 357 (see line below).
>> Can you load Devel::SimpleTrace and get a full stack trace of the failure?
> Is it possible that this has got something to do with me explicitly
> use'ing some Schema classes in controllers because they have some
> constants defined that I need to access?

My suspicion was right: After removing all "use MyApp::Schema::*"
occurrences from our controllers the app started. Nevertheless, I'm
not sure if this is expected behaviour.

I skimmed through the mailing list archive and found a thread about
how best to arrange constants and the recommendation was to create a
separate MyApp::Constants class. But to me it sounds more rational to
store, say different role IDs as constants in the corresponding
MyApp::Schema::Role model class...

Any thoughts?

--Tobias

_______________________________________________
List: [email protected]
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/[email protected]/
Dev site: http://dev.catalyst.perl.org/

Reply via email to