[Catalyst] DBIC custom SQL hack stopped working after upgrading Catalyst

Tobias Kremer tobias.kremer at gmail.com
Mon Aug 9 15:04:24 GMT 2010

On Mon, Aug 9, 2010 at 12:24 PM, Tobias Kremer <tobias.kremer at gmail.com> 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?


More information about the Catalyst mailing list