I'm working on something very similar actually - I wanted a Moo-based approach, too. Technically I'm writing it to learn more about Moo, wasn't meant for anything serious, but you might be able to build on it if you wished :-)
Perl ORM with Moo
-
16-03-2022 - |
题
I'd like to use Moo as the Object Oriented approach for my app (with a relational database). I had used DBIx::Class & Rose::DB::Object in the past, but these distributions are not Moo (neither Moose) related. I am looking for an ORM (or similar) with a Moo integration, do you know if this exists, or anyone has related plans?
解决方案 3
其他提示
I don't know what do you mean by Moo integration, but I just installed the last version of DBIx::Class
and saw that Moo
was installed as a dependency. So, in version 0.08209, DBIx::Class
has Moo
as a dependency
Have a look at DBIx::Mint You will need to add a role to your Moo classes
with 'DBIx::Mint::Table';
And also write a schema file. This schema file should have all information on classes you're going to use (class-to-table mapping, relationship to other tables/classes). No need to write schema file for each Moo class.