Alien::Base Perl Foundation Grant Report Month 1

Once again I would like the thank the Perl Foundation for supporting me in my effort to provide a mechanism to ease the creation of Alien:: modules. Further I’d like to thank the many Perlers who have commented in various places that this project is of interest and that they are looking forward to providing that Alien:: module that they have always meant to write. This is exactly the response that I had hoped to receive.

Down to the details. This month I did a lot of work on Alien::Base; partially do the excitement about the grant and partially because our scientific camera was out for repairs, thus not much science going on in the lab. I hope to keep the pace high, but looking over the git log I’m not sure that they can be this productive! I’ll list some high points:

  • A::B now relies on M::B to handle most of the attributes. Originally I was pulling out my hash keys before creating the object. The few that I still do parse manually I do because there are states that M::B expects prior to the object being created, and I must ensure that those states exist.
  • A::B now includes a simple pkgconfig file parser and storage/munging engine. This allows for A::B to know what cflags and libs to provide and which -L directories to include even after M::B moves the files to their final location. I am considering using mnunberg’s new PkgConfig module to do the parsing, but in truth, the spec doesn’t seem very difficult (famous last words? let me know in the comments)
  • Removed an awkward system for supplying defaults for all repositories and building repository objects from them. The new engine for this is much simpler and allows for true constructors for the repository objects. This is necessary if my goal of presenting a fully subclassable module
  • Possibly the most important item: use Alien::MyModule; now provides the location of the library to the Perl’s run-time loader via LD_RUN_PATH (or PATH on windows). I may need to expand this for other platforms; I’m not familiar with this stuff on any platform but Linux, though my goal has always been to be as x-platform as possible
  • Wrote lots of documentation and tests. Of course there is plenty more to go, but I think that a reasonably competent CPAN author could write an Alien:: module using only these documents. See especially: A::B::Authoring and A::B::ModuleBuild::API.
  • Created an initial dev release, 0.000_001 and given the testers results, two further releases; now at 0.000_003.

Still on my list:

  • Fix a recurring bug that the testers see. It seems to always happen on Solaris, but also appears occasionally on other platforms.
  • Provide a few inheritable tests so that Alien:: authors can have a backbone test provided for them. I expect this will be something in a Test::Class kind of implementation. However the abstractions make this test hard to test, so I’m working on it.

Finally I want to share a little story. At just the right time, I happened to notice that Richard Simões had started an Alien::Nettle project on his GitHub account. Just for fun, I decided to see how easy it would be to write my own Alien::Nettle for this nettle library that I had never heard of, but which seemed to meet my mental image of a good candidate for the Alien::Base system. The project to me all of about 5 minutes and worked successfully! I contacted Richard to mention it and he was quite excited.

This has been added to the examples directory (in his name). There are other examples too, including my own pet Alien::GSL. Take a look to see how easy this can be.

Do you have an Alien:: project that you wish you could write? Once I knock out this bug, I will release an alpha version, probably 0.001 and I will issue a call-to-arms. The reason for this is two-fold.

  1. I want to hear what problems you have in writing your Alien:: module. Where is the framework not flexible enough? How is it confusing to you? Alien::Base has no purpose without users, I want to have you involved sooner rather than later.
  2. I want my actual release (1.000) to be accompanied by a host of other releases of YOUR Alien:: projects. Hopefully coordinated on the same day. What could be a better demonstration of a new easy mechanism for library support?

Finally, just wanted to mention that the project is available on GitHub - including those examples :-) Please, take a peek and comment either there or here, email me at joel dot a dot berger at gmail, or even chat me up on #alien, which I have created to support the authors after my call-to-arms.


Leave a comment

About Joel Berger

user-pic As I delve into the deeper Perl magic I like to share what I can.