BabelKit Perl Source Code Setup

Read the Overview and the Code Table Setup pages first.

Load and test the bk_code table schema definition as well as the core data records. The proceed with the source code setup and testing.

The BabelKit Perl source code is in the perl directory:

    BabelKit.pm       - BabelKit module definition.
    bk_admin.pl       - Setup for bk_admin_main.pl.
    bk_admin_main.pl  - BabelKit Translation Utility.
    bk_connect.pl     - Database connection setup.
    bk_demo.pl        - BabelKit Demo page.
    t/test.t          - Regression testing.
    Makefile.PL       - Makefile setup.
BabelKit.pm requires the DBI.pm module. The Translation Utility and the Demo page need the CGI.pm module.

Database Connection Setup

You can customize the bk_connect.pl file to open a database handle to your database. If your application setup has already opened a database handle, use that handle instead of opening a new one.

bk_connect.pl is used by bk_admin.pl, bk_demo.pl and by t/test.t.

BabelKit.pm Setup

Copy the BabelKit.pm file into a directory on your Perl include path. Or do the makefile thing:
    $ perl Makefile.PL
    $ make
    $ make test
    # make install

BabelKit Regression Test

Once the code table is set up and loaded and bk_connect.pl is set up run the regression tests on the basic BabelKit module functions:
    $ make test

BabelKit Translation Utility Setup

Customize the bk_admin.pl file to your situation:
  • Require and open a BabelKit handle.
  • Set the $perm_add, $perm_upd and $perm_del global variables. These let the user add, update and delete codes.
  • Define the bka_sess_url() function. Customize this if you are carrying session identifiers in your urls.
  • Require bk_admin_main.pl and call the bka_admin_main() function.

Demo Page Setup

In order for the demo page to function, you will need to load the demo data records.