Now I understand that DBIx::Class is more flexible than Class::DBI! On the other hand, this comes at the price of longer code for simple tasks, e.g., for inserting into a table 'Person'
, one would use
# using DBIx::Class:
# using Class::DBI:
Nevertheless, the greater flexibility motivated me to try DBIx::Class, too. What still bothers me is that
use base 'DBIx::Class';
use base 'DBIx::Class::Schema';
fails with Can't locate object method "result_source_instance" via package "DB/Person" (perhaps you forgot to load "DB/Person"?) at c:/Perl/site/lib/DBIx/Class/Schema.pm line 75.
If I put the definition of DB::Person
, it works, but is far less elegant/compact. Is there a smarter solution?