Perl

These programs and modules are some of the Perl code I have written. They are distributed under the same terms as Perl itself. Of course, none of them comes with any kind of warranty whatsoever.

YAPC

I have made presentations at some of the YAPC conferences. Some of the papers and slides are available.

Modules

Devel::Cover.pm

The README says:

This module provides code coverage metrics for Perl.

Code coverage data are collected using a pluggable runops function which counts how many times each op is executed. These data are then mapped back to reality using the B compiler modules. There is also a statement profiling facility which needs a better backend to be really useful.

The cover program can be used to generate coverage reports.

Statement, branch, condition, subroutine, pod and time coverage information is reported. Statement coverage data should be reasonable, although there may be some statements which are not reported. Branch and condition coverage data should be mostly accurate too, although not always what one might initially expect. Subroutine coverage should be as accurate as statement coverage. Pod coverage comes from Pod::Coverage. Coverage data for path coverage are not yet collected.

The gcov2perl program can be used to convert gcov files to Devel::Cover databases.

You may find that the results don't match your expectations. I would imagine that at least one of them is wrong.

Requirements:
* Perl 5.6.1 or greater. Perl 5.7.0 is unsupported. Perl 5.8.2 or greater is recommended. Whilst Perl 5.6 should mostly work you will probably miss out on coverage information which would be available using a more modern version and will likely run into bugs in perl. Perl 5.8.0 and 5.8.1 will give slightly different results to more recent versions due to changes in the op tree.
* The ability to compile XS extensions. This means a working compiler and make program at least.
* Storable and Digest::MD5 Both are in the core in Perl 5.8.0 and above.
* Pod::Coverage if you want Pod coverage.
* Test::More in order to run the tests.
* Test::Warn in order to run some of the tests.
* Test::Differences if the tests fail and you would like nice output telling you why.

I have given a few presentations about Devel::Cover.

Have a peek at what happened when I ran Devel::Cover on some CPAN modules.

Download Devel-Cover-1.33.tar.gz (205k).

If you want to get involved, there are plenty of projects looking for people to work on them.


Gedcom.pm

This module provides for manipulation of GEDCOM files. GEDCOM is a format for storing genealogical information designed by The Church of Jesus Christ of Latter-Day Saints. Information about GEDCOM is available as an exe file at familysearch.org. Unfortunately, this is only usable if you can access a PC running Windows of some description. Part of the reason I wrote this module is because I don't do that. Well, I didn't. I can now although I prefer not to...

The GEDCOM format is specified in a grammar. Gedcom.pm parses the grammar which is then used to validate and allow manipulation of the GEDCOM file. I have only used Gedcom.pm with version 5.5 of the GEDCOM grammar, which I had to modify slightly to correct a few errors. The advantage of this approach is that Gedcom.pm should be useful if the GEDCOM grammar is ever updated. It also made the software easier to write, and probably more dependable too. I suppose this is the virtue of laziness shining through.

Download Gedcom-1.22.tar.gz (118k).

An old ppd for ActivePerl users is at Gedcom.ppd

To store my genealogy I wrote a syntax file and use vim to enter the data, and Gedcom.pm to validate and manipulate it. I find this to be a nice solution.

People kept asking about generating HTML using Gedcom.pm, and I kept saying that Gedcom.pm was too resource intensive to be used for CGI work and that I hadn't done anything about it. Well, now I have. royal92 contains about 3000 individuals and just under half that many families. Of course, the HTML is pretty minimal, but it's just hacked together for proof of concept.


Shell::Source.pm

The README says:

Shell::Source allows arbitrary shell scripts, or other programs for that matter, to be run and their environment to be inherited into a Perl program.

Download Shell-Source-0.01.tar.gz (4k).


Programs

podgen

The podgen program automatically generates documentation stubs for Perl programs. The stub generated is in a standard format, with space to describe the overall working of the program or module as well as descriptions of all the subroutines found.

Jess Robinson updated it to bring things into line with Damian Conway's Perl Best Practices book.

Download podgen-0.05.tar.gz (5k).


SureSpell

SureSpell is a program I have written in Perl/Tk that is currently being used by the Farnborough Dyslexia & Learning Centre with DysCypher exercises to teach children and adults who are achieving below their potential, especially those that are dyslexic.