Initial perl, XS code, and tests.