I have been meaning to write this post for a while, but between $work and getting sick I have not really had the brain capacity to do it. Being that I am still a little sick and $work is still busy, I am making no promises about the quality of this post.
In a previous blog post I mentioned that I was going to port my module Bread::Board to p5-mop which I managed to finish up about three weeks ago and then promised to write a post about my experience. Well better late then never, here is that post.
NOTE: if all the Bread::Board terminology gets tedious, skip down to the TL;DR at the end to read my conclusions.
I recently took a vacation with my family and actually didn't spend any time working on p5-mop-redux (or any code for that matter) which was actually kind of nice (odd but nice). But thankfully Jesse Luehrs, my co-conspirator on the previous p5-mop attempt, found himself with some free time and so was hacking away. He ported one of his newest modules, Reply (which is a really nice REPL for Perl, you should try it) and noticed that the startup time was pretty slow (something important for a REPL). Of course this is to be expected in a prototype, but still, Jesse went and added this simple method cache which resulted in an almost 3x speedup for startup time.
Jesse also added two new class traits both of which are important for enabling users to subclass MOP based classes using non-MOP based classes.
I spent much of last week on vacation with the family so very little actual coding got done on the p5-mop, but instead I did a lot of thinking. My next major goal for the p5-mop is to port a module written in Moose, in particular, one that uses many different Moose features. The module I have chosen to port is Bread::Board and I chose it for two reasons; first, it was the first real module that I wrote using Moose and second, it makes heavy use of a lot of Moose's features. I actually expect this port to be much more involved and require more actual design changes then the other ports have, simply because not all the Moose features used will be easily translated into MOP idioms. So in preparation for this I have been doing a lot of thinking about mapping the MOP to Moose and even started writing some documentation for it.
I have been spending a lot of time lately porting modules to p5-mop as a way to really stretch and test out the prototype. Additionally a few other people are also porting modules as well. The result is that we now have a nicely expanding "external" test suite. This is something I found with Moose, while it is very nice to have a good size test suite, it is even better to have real modules (that perform real work) and themselves have good test suites. For a module like Moose and a project like p5-mop, this kind of testing is critical in exposing issues that normal unit tests just won't shake out.
I recently started porting Plack to the p5-mop and yesterday I completed the "straight" port of the code. This means I didn't try to refactor anything to take advantage of any p5-mop features, I just converted plain Perl classes to their p5-mop equivalent.
My main reasoning for doing this was that I really wanted to push this prototype in real world scenarios, not just contrived tests and simplistic examples. This is a mistake I believe we made with the first prototype. So that said, I am happy to report that all 1152 of the Plack tests are passing.