Skip to main content


Damnit, I bought this book on Object Oriented Perl as a joke >.<

Jay Hannah reshared this.

@Richard "mtfnpy" Harman exactly
but my brain *really* wants individual objects to have their own subroutines
that book changed tons of our source code ~20 years ago. 🙂

@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

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 https://metacpan.org/dist/Moose/view/lib/Moose/Manual.pod 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.

@ovid Happy to chat you through it if you like: https://discord.gg/W3hu4e8r2w

@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!

@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.

@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: https://github.com/Ovid/Cor/blob/master/rfc/mvp.md

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)

@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.

https://chris.prather.org/perl-roguelike-part-0.html

@ovid I thought we were friends, but I'm still waiting for @perigrin to approve my follow request. :)
@perigrin he says, while still not accepting it so I'm still locked out
@deafferret
It's not just you, although I don't know if I've met @perigrin in person.
@AFresh1 @deafferret I did accept yours two days ago. Something fishy is up with my instance me thinks.
@perigrin
Well fedilab still says pending, but I'll have to get on a computer at some point and look there.
@deafferret

@AFresh1 @perigrin Never meet your heroes.

JOKING. ❤️ He's lovely in person. 😉

@ovid huh. I thought github used to render POD? Did they stop? Is there a HTML render of this anywhere? https://github.com/Ovid/Cor/blob/master/pod/perlclasstut.pod
(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 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: https://gist.github.com/Ovid/4cc649c1eb3142b6a856d94c54b1d4ed

@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.