p5-MOP meta layer progress

So when I started the p5-mop-redux project I purposefully avoided getting too deep into the meta-layer swamp. One of the things that became really difficult with the previous attempt was the level of complexity in the meta-layer bootstrapping. For this new version I decided I was going to favor a simpler and more manual bootstrapping process, and so proceeded to punt on it until I got the regular class layer working.

Well today I decided it was time to dive into that meta-layer swamp, and I am happy to say, ... it works!! (after a bunch of tweaking and fiddling that is).

Here is one of the tests from the previous prototype converted to work with the specifics of this MOP. It implements a simple metaclass which will auto-generate public accessors for all your attributes.

Additionally here is another converted test which does the same thing, but takes an optional validator to do validation on values being set (similar to Moose). This also demonstrates has variables being able to take in extra metadata.

This did require me to rework the meta-layer so that it stored values exactly like other classes will, which, while ugly in places, is still more understandable then the old prototypes bootstrap code. All in all, I am pretty happy with today's progress.


Hi Stevan

Have you considered crowdsourced funding?

I'm not opposed to the Perl Foundation form of support, but the indefiniteness of your milestones might make them reluctant.

I'd be prepared to thrown some $ in.

Leave a comment

About Stevan Little

user-pic I blog about Perl.