dbsrgits / dbix-class-schema-loader

Official GitHub remote for git.shadowcat.co.uk DBIx-Class-Schema-Loader.git
http://dbix-class.org/
11 stars 34 forks source link

Generated classes should always use C3 mro [rt.cpan.org #132035] #41

Open rabbiveesh opened 1 year ago

rabbiveesh commented 1 year ago

Migrated from rt.cpan.org#132035 (status was 'new')

Requestors:

From dakkar@cpan.org on 2020-03-01 13:09:06 :

Currently, Result classes generated by Schema::Loader use the normal Perl MRO. This creates problems when usinc a custom base class that uses multiple components, see for example https://github.com/frioux/DBIx-Class-Helpers/issues/91 and the discussion at https://github.com/frioux/DBIx-Class-Helpers/pull/103

Adding an explicit C<use mro 'c3';> after the C<use base> is enough to fix the problem. I'm not completely sure how C3 works in Moose classes, though.