Galdor has asked for the wisdom of the Perl Monks concerning the following question:

Evaluating new Perl v5.38 OOP class keyword. Seems very promising.

However I cannot really use it for any serious applications without some kind of ORM (like DBIx::Class?) ) to persist data in standard Pg/SQLite databases - what are my options if any?

The ability to "reverse Enginner" the DB schema into class file would be key due to fairly extensive DB schemas.

BTW - by what name do I refer to this object system to differentiate from the hundreds of other Perl object systems?

Replies are listed 'Best First'.
Re: ORM for new native Perl Object System
by Corion (Patriarch) on Dec 16, 2025 at 08:30 UTC

    While I'm not fond of ORMs, as they usually get in the way of me writing SQL, I think you can make DBIx::Class return (row) objects of your own class whatever it is based on via DBIx::Class::ResultSet->result_class. But that won't make DBIx::Class based on the new class objects.

    If you want to generate classes for an existing schema, I would look at adding a corresponding template to SQL::Translator.

      Ye - I prefer to start with SQL DB schema and expand from there. ok - I do not know anything about SQL::Tranlator - I guess DBIC is build on it - but I will take a look. But this Perl class will need some sort of DB persistence to be o any use.
Re: ORM for new native Perl Object System
by hippo (Archbishop) on Dec 16, 2025 at 11:15 UTC
    by what name do I refer to this object system

    It's a long and sorry saga. Originally it was to be called Cor until everyone pointed out what utter confusion that would cause. Then it was named Corinna, which was at least less ambiguous. However, now that it is part of the language it's name is ... nothing at all AFAICS.


    🦛

Re: ORM for new native Perl Object System
by CountZero (Bishop) on Dec 16, 2025 at 08:06 UTC
    Perl New Native Object System -> PenNOS

    or

    Perl Native Object System -> PeNOS But be careful! The "I" and "O" are next to each other on my keyboard, so an unfortunate typo is quickly made.

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

    My blog: Imperial Deltronics

      That's the problem with us software developers. We are just not good at finding marketable names. You know, names that aren't acronymes.

      What about these:

      • Objects++
      • SuperObjects
      • Blessed camels

      I know, i know. I'm also very bad at naming things...

      PerlMonks XP is useless? Not anymore: XPD - Do more with your PerlMonks XP
      Also check out my sisters artwork and my weekly webcomics
        We are just not good at finding marketable names.

        Think of pixel, switch, lens, atom, electron, chrome and chromium, pebble, brackets, tab, scirocco, bora, galaxy. All are generic words abused as brand names, or major parts of brand names, creating unnecessary ambiguities and polluting search results.

        Alexander

        --
        Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)