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

Alexander Hartmaier alexander.hartmaier at t-systems.at
Tue Aug 10 08:29:38 GMT 2010

Hi Tobias,

I've added a My::Model::Constants namespace which several modules
containing constants for different parts of my schema and include those
in my result(set) classes if needed and the cat apps using the model.

Best regards, Alex

Am Montag, den 09.08.2010, 17:04 +0200 schrieb Tobias Kremer:
> 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?
> --Tobias
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/

T-Systems Austria GesmbH   Rennweg 97-99, 1030 Wien
Handelsgericht Wien, FN 79340b
Notice: This e-mail contains information that is confidential and may be privileged.
If you are not the intended recipient, please notify the sender and then
delete this e-mail immediately.

More information about the Catalyst mailing list