First release

February 19, 2008

As part of the buildtools project I’ve now tested and documented LCFG::Build::PkgSpec, here is the RPM and the SRPM. If you want to have a play you will need some extra packages installed on your machine. On DICE FC6 you can use ed/options/moose.h to pull in most of the stuff. You will then need to add these as well:

!profile.packages     mEXTRA(perl-Data-Structure-Util-0.12-2.fc6\

At this point the main two useful things to look at are the scripts lcfg-cfg2meta and lcfg-pkgcfg. If you are interested in how to use Moose take a look at LCFG/Build/, hopefully it is fairly clear and not too scary!

One cool thing I have just discovered is that because the lcfg.yml is similar to the META.yml used for Perl modules on CPAN, you can do this to generate a basic LCFG metadata file:

perl -MLCFG::Build::PkgSpec -e '$spec = LCFG::Build::PkgSpec->new_from_metafile("META.yml"); $spec->save_metafile("./lcfg.yml")'

Testing, testing…

February 19, 2008

I’ve been adding tests to one of the Perl modules I have written for the buildtools project. This is for two reasons, firstly, it’s good to have tests for the code as it helps spot bugs and makes it easier to add further functionality safe in the knowledge that none of the earlier work has been broken. Secondly, I wanted to try out a few testing strategies which might be useful when it comes to the LCFG core refactoring project. I have been playing with Devel::Cover which measures how much of the code is covered by the test suite – here’s some results. My initial trials suggest this is quite a good strategy as it encouraged me to think about all the different pathways through the code and it did find one rather nasty bug.