Modules ported to p5-mop

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.

Overall I found the process pretty simple, albeit somewhat repetitive and tedious (which is to be expected). I uncovered a couple bugs and issues, but was able to get past them with the exception of a warning from Module::Refresh when it reloads a mop module (this I think is just a consequence of using Devel::Declare, so I am ignoring it for now).

This is actually not the first module that was ported, that was actually Forward::Routes which A.Vieth ported very early in the development of this prototype (and really helped push development along). The test suite for this module is actually very comprehensive and all 1410 of those tests are still passing on the latest p5-mop.

In addition to this, Damien Krotkine ported his Bloomd::Client module the other day. The really cool part about this port is how small the actual changes were, which had a lot to do with the fact he was already using Moo and Method::Signatures, but I still take that as a good sign.

I would love to see more people doing this, I think it will really help to test the prototype in a number of ways that regular units tests cannot do.


I wanted to start converting my modules too but got a few issues (including a segfault) in the process of running perl 5.16 using Perlbew. :(

Leave a comment

About Stevan Little

user-pic I blog about Perl.