Conway's OO Perl book from 20 years ago was AWESOME at the time, changed our code very much for the far better. :)
Nowadays OO Perl is Moose metacpan.org/dist/Moose/view/l… or one of it's many lighter-weight alternatives (lightweight is unnecessary for your use case).
~Soon-ish OO Perl will probably be Corona, but it's only (partially) in bleeding edge Perl for now, if I understood correctly. Check out @ovid for his many posts about that if you care about bleeding edge Perl stuff.
@Jay Hannah @Curtis "Ovid" Poe ok yeah, I've used moose a lIttle, not sure what edition my OO Perl book is (again, bought as joke), but I think I saw Moose in it
I am kinda... anti bleeding edge, I like stable and boring.
@ovid if your OO Perl book has Moose in it that's probably a modern book that's good to go. My OO Perl book was ~20 years ago, looooong before Moose was invented. :)
@ovid Moose was invented in 2006 apparently, and it's been backwards-compatible the entire time as far as I know. So anyone anywhere writing about how to use Moose is probably all still solid and completely usable on latest stable perl (5.38.0), no problems. :)
@deafferret If you want to take a risk with the new OO syntax, ask me anything. I'm the lead designer 😃 (though I'm fortunate that I had a great design team who helped me avoid some major screwups)
@Curtis "Ovid" Poe @Jay Hannah Well I'm great at being a major screwup, so, sure, if I am gonna learn something it might as well be the new thing, I'll do my best to bug report, but uh, I am not doing anything strenuous or complicated, and only when I'm too tired to work on something important, but have time to do something for fun, which is rare.
You can use the latter to see what will be coming up. @leonerd is doing the implementing, so he might have an idea on the time frame (though I don't think there is one)
@ovid huh. I thought github used to render POD? Did they stop? Is there a HTML render of this anywhere? github.com/Ovid/Cor/blob/maste… (This is the landing page for people (like me) who want to learn how to use Cor?)
(Apologies for calling it Corona, that was NEVER the name. Whoops! 🙂)
@deafferret @ovid Honestly for OO theory from a practical standpoint I think Conway’s Object Oriented Perl still stands up. I was recently thinking about how Corinna finally introduced a fly-weight pattern that I didn’t find exceptionally painful like I did when I first tried it after reading Conway’s book.
silverwizard
Unknown parent • •but my brain *really* wants individual objects to have their own subroutines
Jay Hannah
in reply to silverwizard • • •silverwizard likes this.
silverwizard
in reply to Jay Hannah • •@Jay Hannah oh - is that because it's good or real bad?
I am trying to write a card game for fun - but in order to do that I wanna put routines on cards, so that means objects. But uh.... blah
Jay Hannah
in reply to silverwizard • • •Conway's OO Perl book from 20 years ago was AWESOME at the time, changed our code very much for the far better. :)
Nowadays OO Perl is Moose metacpan.org/dist/Moose/view/l… or one of it's many lighter-weight alternatives (lightweight is unnecessary for your use case).
~Soon-ish OO Perl will probably be Corona, but it's only (partially) in bleeding edge Perl for now, if I understood correctly. Check out @ovid for his many posts about that if you care about bleeding edge Perl stuff.
Moose::Manual
metacpan.orgsilverwizard likes this.
Jay Hannah
in reply to Jay Hannah • • •Join the Perl Discord Server!
Discordsilverwizard likes this.
silverwizard
in reply to Jay Hannah • •@Jay Hannah @Curtis "Ovid" Poe ok yeah, I've used moose a lIttle, not sure what edition my OO Perl book is (again, bought as joke), but I think I saw Moose in it
I am kinda... anti bleeding edge, I like stable and boring.
But thanks!
Jay Hannah
in reply to silverwizard • • •silverwizard likes this.
Jay Hannah
in reply to Jay Hannah • • •silverwizard likes this.
Curtis "Ovid" Poe (he/him)
in reply to silverwizard • • •silverwizard
in reply to Curtis "Ovid" Poe (he/him) • •Curtis "Ovid" Poe (he/him)
in reply to silverwizard • • •@deafferret Be aware that it's still experimental not not complete! `perldoc perlclass` should tell you which features are implemented.
The MVP for the core itself is here: github.com/Ovid/Cor/blob/maste…
You can use the latter to see what will be coming up. @leonerd is doing the implementing, so he might have an idea on the time frame (though I don't think there is one)
silverwizard likes this.
Curtis "Ovid" Poe (he/him)
in reply to silverwizard • • •@deafferret
Also, for a more realistic view of what can be done now, check out @perigrin 's Roguelike Game Tutorial using the new syntax. He's up to part 6 now.
chris.prather.org/perl-rogueli…
A Roguelike in Perl Part 0 - The Setup
Chris Prather (The Room)silverwizard likes this.
Jay Hannah
in reply to Curtis "Ovid" Poe (he/him) • • •silverwizard likes this.
Chris (so far)
in reply to Jay Hannah • • •Jay Hannah
in reply to Chris (so far) • • •Andrew Hewus Fresh
in reply to Jay Hannah • • •It's not just you, although I don't know if I've met @perigrin in person.
silverwizard likes this.
Chris (so far)
in reply to Andrew Hewus Fresh • • •Andrew Hewus Fresh
in reply to Chris (so far) • • •Well fedilab still says pending, but I'll have to get on a computer at some point and look there.
@deafferret
Jay Hannah
in reply to Andrew Hewus Fresh • • •@AFresh1 @perigrin Never meet your heroes.
JOKING. ❤️ He's lovely in person. 😉
silverwizard
in reply to Curtis "Ovid" Poe (he/him) • •like this
Chris (so far) likes this.
Jay Hannah
in reply to Curtis "Ovid" Poe (he/him) • • •@ovid huh. I thought github used to render POD? Did they stop? Is there a HTML render of this anywhere? github.com/Ovid/Cor/blob/maste…
(This is the landing page for people (like me) who want to learn how to use Cor?)
(Apologies for calling it Corona, that was NEVER the name. Whoops! 🙂)
Curtis "Ovid" Poe (he/him)
in reply to Jay Hannah • • •@deafferret I drank a Corona last night. Perfect for hot weather, so I've no complaints about that mistake :)
Yeah, github not rendering POD there is disappointing, so I created a better version a while ago: gist.github.com/Ovid/4cc649c1e…
Perl class tutorial
GistChris (so far)
in reply to Jay Hannah • • •