More tests and more traits for p5-MOP

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.

Here is the current breakdown of our entire test suite (internal and external).

That gives us a total of 3955 tests spread out over 293 files, which is not too bad.

My next task is to try and port a Moose module to p5-mop, and in preparation for that I have added the built_by trait, and the lazy trait to the core (two heavily used features in Moose). Additionally I played around with creating a few more Moose style traits in a test. Now all I need to do is find a suitable module to port.

2 Comments

Thanks for the update. Why not call the trait builder instead of built_by? That is what everyone who uses Moose is used to.

Because traits in mop are introduced by the is keyword. So the following reads nicely:

has $shopping_list is built_by("_build_shopping_list");

Leave a comment

About Stevan Little

user-pic I blog about Perl.