Re: Shlomif's Tenth Law of Perl OOP and Test-Run
[email protected] (Stevan Little)
| Newsgroups | perl.moose |
|---|---|
| Message-ID | <[email protected]> |
Shlomi, On May 9, 2008, at 12:03 AM, Shlomi Fish wrote: >>> Shlomif's Tenth Law of Perl OOP: "Every sufficiently complex >>> Class::Accessor >>> program contains contains an ad hoc, informally-specified, bug- >>> ridden, slow >>> implementation of half of Moose." >> >> Very nice, I like that quote, if you don't mind I will likely include >> it in the YAPC::NA talk I am gonna give. > > No, I don't mind at all, and it will be a pleasure to see myself > quoted there. > (An attribution would be nice, and linking to the original > Greenspun quote). Of course, I am always happy to give credit where credit is due :) >> You will find, as others who are porting other Class::Accessor code >> to Moose, that there are some Class::Accessor-isms that conflict with >> Moose-isms so be watchful during the port. Otherwise, i think you >> will find you can clean up your code pretty well using Moose :) > > OK, thanks. I think I'll set up a separate svn branch on > svn.berlios.de for > the Moose conversion, so I'll be able to do the conversion > incrementally > without breaking the trunk and so that I can continue fixing bugs, > etc. in > the trunk in case I need to. Having Moosified several older code bases, I have found that incremental conversion tends to work to a point. At some point you have to untangle some of the knots that vanilla Perl OOP sometimes puts you in, and they tend to not map directly to Moose-isms as well. I had this issue with my IOC module, and ended up just re-writing it from scratch as Bread::Board. - Stevan